summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-05-11 00:26:15 +0100
committerMarkos Chandras <mchandras@suse.de>2017-05-11 23:42:13 +0100
commita8fccd070b795c0317a4809908776c9d96a5d64c (patch)
tree3217bfbb3a03d0094ba6647a5d05b933c610ded8 /jjb/xci
parent3d337be36ef3556c9f5ce9cd2a9082f6f95685b2 (diff)
jjb: xci: bifrost: Clone git repositories to $WORKSPACE
Commit 0638af211db1 ("jjb: xci: xci-deploy.sh: Run the deployment script as normal user") dropped 'sudo' from the bifrost provisioning script. However this broke the jobs since the repositories were being cloned into /opt where the jenkins user has not access to. As such, clone the repositories in the $WORKSPACE directory instead. Fixes: 0638af211db1 ("jjb: xci: xci-deploy.sh: Run the deployment script as normal user") Change-Id: I55baceaada04496884470997562e3f512f2444a0 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'jjb/xci')
-rw-r--r--jjb/xci/bifrost-verify-jobs.yml4
-rwxr-xr-xjjb/xci/bifrost-verify.sh16
2 files changed, 10 insertions, 10 deletions
diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml
index 806829620..c6da9f413 100644
--- a/jjb/xci/bifrost-verify-jobs.yml
+++ b/jjb/xci/bifrost-verify-jobs.yml
@@ -12,10 +12,10 @@
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
#--------------------------------
diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh
index 18019a7cb..2e6f2272c 100755
--- a/jjb/xci/bifrost-verify.sh
+++ b/jjb/xci/bifrost-verify.sh
@@ -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