From c14b86987c50050a85f0394bf8d3eca89a0c64b7 Mon Sep 17 00:00:00 2001 From: "valentin.radulescu" Date: Thu, 14 Nov 2019 03:58:53 -0800 Subject: [PATCH] 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 --- jjb/shell/run_bluval.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.16.6