diff options
Diffstat (limited to 'jjb/infra/openstack-bifrost-verify.sh')
-rwxr-xr-x | jjb/infra/openstack-bifrost-verify.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jjb/infra/openstack-bifrost-verify.sh b/jjb/infra/openstack-bifrost-verify.sh index a4653f921..c17cb8861 100755 --- a/jjb/infra/openstack-bifrost-verify.sh +++ b/jjb/infra/openstack-bifrost-verify.sh @@ -11,6 +11,16 @@ set -o errexit set -o nounset set -o pipefail +trap fix_ownership EXIT + +function fix_ownership() { + if [ -z "${JOB_URL+x}" ]; then + echo "Not running as part of Jenkins. Handle the logs manually." + else + chown -R jenkins:jenkins $WORKSPACE + fi +} + # check distro to see if we support it # we will have centos and suse supported in future case "$DISTRO" in @@ -24,7 +34,7 @@ case "$DISTRO" in esac # remove previously cloned repos -/bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/releng +/bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/stack /opt/releng # clone upstream bifrost repo and checkout the patch to verify git clone https://git.openstack.org/openstack/bifrost /opt/bifrost |