X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finfra%2Fopenstack-bifrost-verify.sh;h=c17cb88613b2a32cee5fc693526f29731feab597;hb=02a8f28965109c5c580f4764742382bc1df55762;hp=42236f09242352adb34ae7b9dc481c193c5dc9c1;hpb=bade843cdc7a2d6f8c55cfbc23deaa64a45090ab;p=releng.git diff --git a/jjb/infra/openstack-bifrost-verify.sh b/jjb/infra/openstack-bifrost-verify.sh index 42236f092..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