From: valentin.radulescu Date: Thu, 14 Nov 2019 11:58:53 +0000 (-0800) Subject: Change owner of results folder and its files. X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=c14b86987c50050a85f0394bf8d3eca89a0c64b7 Change owner of results folder and its files. JIRA: VAL-88 The files in results folder are created by root in container. Signed-off-by: valentin.radulescu Change-Id: I9d7b9450c6ae379a8f41492d84f037e3557ef032 --- diff --git a/jjb/shell/run_bluval.sh b/jjb/shell/run_bluval.sh index 5f0c4db..5870ed9 100755 --- a/jjb/shell/run_bluval.sh +++ b/jjb/shell/run_bluval.sh @@ -14,6 +14,12 @@ set -o pipefail cwd=$(pwd) is_optional="false" +finish() { + # Fix ownership of output files + user_id=$(stat -c '%u:%g' $cwd) + sudo chown -R ${user_id} $results_dir +} + info () { logger -s -t "run_blu_val.info" "$*" } @@ -112,6 +118,8 @@ then fi fi +trap finish EXIT + if [ ! -d "$cwd/validation" ] then git clone http://gerrit.akraino.org/r/validation