2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2016 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci
17 git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
19 # combine opnfv and upstream scripts/playbooks
20 /bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/
22 cd $WORKSPACE/releng-xci
23 cat > bifrost_test.sh<<EOF
30 # provision 3 VMs; xcimaster, controller, and compute
31 ./scripts/bifrost-provision.sh
35 chmod a+x bifrost_test.sh
39 xenial) VM_DISTRO=ubuntu ;;
40 centos7) VM_DISTRO=centos ;;
41 *suse*) VM_DISTRO=opensuse ;;
44 export XCI_BUILD_CLEAN_VM_OS=false
45 export XCI_UPDATE_CLEAN_VM_OS=true
47 ./xci/scripts/vm/start-new-vm.sh $VM_DISTRO
49 rsync -a -e "ssh -F $HOME/.ssh/xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
51 ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"