Merge "jjb: xci: bifrost: Clone git repositories to $WORKSPACE"
authorMarkos Chandras <mchandras@suse.de>
Tue, 16 May 2017 15:01:35 +0000 (15:01 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 16 May 2017 15:01:35 +0000 (15:01 +0000)
jjb/xci/bifrost-verify-jobs.yml
jjb/xci/bifrost-verify.sh

index 8068296..c6da9f4 100644 (file)
     project:
         - 'openstack':
             project-repo: 'https://git.openstack.org/openstack/bifrost'
-            clone-location: '/opt/bifrost'
+            clone-location: '$WORKSPACE/bifrost'
         - 'opnfv':
             project-repo: 'https://gerrit.opnfv.org/gerrit/releng'
-            clone-location: '/opt/releng'
+            clone-location: '$WORKSPACE/releng'
 #--------------------------------
 # distros
 #--------------------------------
index 18019a7..2e6f227 100755 (executable)
@@ -95,32 +95,32 @@ if [[ ! "$DISTRO" =~ (trusty|centos7|suse) ]]; then
 fi
 
 # remove previously cloned repos
-sudo /bin/rm -rf /opt/bifrost /opt/releng
+/bin/rm -rf $WORKSPACE/bifrost $WORKSPACE/releng
 
 # Fix up permissions
 fix_ownership
 
 # clone all the repos first and checkout the patch afterwards
-sudo git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
-sudo git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost
+git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng
 
 # checkout the patch
 cd $CLONE_LOCATION
-sudo git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
+git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
 
 # combine opnfv and upstream scripts/playbooks
-sudo /bin/cp -rf /opt/releng/prototypes/bifrost/* /opt/bifrost/
+/bin/cp -rf $WORKSPACE/releng/prototypes/bifrost/* $WORKSPACE/bifrost/
 
 # cleanup remnants of previous deployment
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
 sudo -H -E ./scripts/destroy-env.sh
 
 # provision 3 VMs; xcimaster, controller, and compute
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
 ./scripts/bifrost-provision.sh
 
 # list the provisioned VMs
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
 source env-vars
 ironic node-list
 sudo -H -E virsh list