summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-04-28 02:45:50 -0400
committerxudan <xudan16@huawei.com>2018-04-28 03:44:42 -0400
commit61ef00f21f28cd432f7c967daa57ad775fc4f653 (patch)
treea7b5b7629be08df53d1e3c3634ce6b0b9e014bea /jjb
parent583c715b4c5320bdd6e0b09b68af852d8660dc14 (diff)
Dovetail CI jobs failed sometimes when Archive artifacts
According to this https://issues.jenkins-ci.org/browse/JENKINS-47566, the failure seems to be caused by the permission problem. Change the owner of all files in 'results' directory to be jenkins. Change-Id: I0ed30018354259601c39016fc1950ea7db867e78 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/dovetail/dovetail-run.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index f74b10754..a5148cde9 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -323,9 +323,9 @@ docker exec $container_id ${run_cmd}
sudo cp -r ${DOVETAIL_HOME}/results ./
# To make sure the file owner is the current user, for the copied results files in the above line
# if not, there will be error when next time to wipe workspace
-# CURRENT_USER=${SUDO_USER:-$USER}
-# PRIMARY_GROUP=$(id -gn $CURRENT_USER)
-# sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results
+CURRENT_USER=${SUDO_USER:-$USER}
+PRIMARY_GROUP=$(id -gn $CURRENT_USER)
+sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results
#remove useless files to save disk space
sudo rm -rf ./results/workspace