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/xci/infra/bifrost/* $WORKSPACE/
22 cd $WORKSPACE/releng-xci
23 cat > bifrost_test.sh<<EOF
30 # set path for XCI repository
31 export XCI_PATH=~/bifrost/releng-xci
33 # provision 3 VMs; xcimaster, controller, and compute
34 ./scripts/bifrost-provision.sh | ts
38 chmod a+x bifrost_test.sh
42 xenial) VM_DISTRO=ubuntu ;;
43 centos7) VM_DISTRO=centos ;;
44 *suse*) VM_DISTRO=opensuse ;;
47 export XCI_BUILD_CLEAN_VM_OS=false
48 export XCI_UPDATE_CLEAN_VM_OS=true
50 ./xci/scripts/vm/start-new-vm.sh $VM_DISTRO
52 rsync -a -e "ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
54 ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"