summaryrefslogtreecommitdiffstats
path: root/jjb/dovetail
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-05-08 04:46:40 -0400
committerxudan <xudan16@huawei.com>2018-05-08 04:46:40 -0400
commit42ecdb8cc7f847da54c76a4e6b6a4ef32347b81e (patch)
treef677ce9db33bfb01134539e794f32f7c246fc98a /jjb/dovetail
parent523d67bd309294cf3bf9f6ad1c68481c7ef2ae4c (diff)
Bugfix: Dovetail failed to upload results to artifacts
That's mainly because of that 1. The owner of all results files are root:root 2. Sometimes there are some files that can only be read by root 3. User jenkins failed to upload these files Solutions: 1. Change the owner to be jenkins:jenkins 2. Remove these files which are useless for users Change-Id: I0b5e72e8d5045c7e0d64e32a13ba559612460a84 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'jjb/dovetail')
-rwxr-xr-xjjb/dovetail/dovetail-run.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index a5148cde9..a02561dca 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -322,14 +322,16 @@ 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
+echo "Change owner of result files ..."
CURRENT_USER=${SUDO_USER:-$USER}
PRIMARY_GROUP=$(id -gn $CURRENT_USER)
-sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results
+echo "Current user is ${CURRENT_USER}, group is ${PRIMARY_GROUP}"
+sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ./results
#remove useless files to save disk space
sudo rm -rf ./results/workspace
sudo rm -f ./results/yardstick.img
+sudo rm -f ./results/tmp*
echo "Dovetail: done!"