Merge "dovetail: fix wipe workspace error"
authorJun Li <matthew.lijun@huawei.com>
Wed, 29 Mar 2017 15:06:16 +0000 (15:06 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 29 Mar 2017 15:06:16 +0000 (15:06 +0000)
jjb/dovetail/dovetail-ci-jobs.yml
jjb/dovetail/dovetail-run.sh
jjb/dovetail/dovetail-weekly-jobs.yml

index 0bd32a4..b65e6d5 100644 (file)
         - 'dovetail-cleanup'
         - 'dovetail-run'
 
+    wrappers:
+        - fix-workspace-permissions
+
     publishers:
         - archive:
             artifacts: 'results/**/*'
             allow-empty: true
             fingerprint: true
 
-########################
+#--------------------------
 # builder macros
-########################
+#--------------------------
 - builder:
     name: dovetail-run
     builders:
index 4b00ec8..5161a3c 100755 (executable)
@@ -85,11 +85,11 @@ echo "Container exec command: ${run_cmd}"
 docker exec $container_id ${run_cmd}
 
 sudo cp -r ${DOVETAIL_REPO_DIR}/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
+# 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
 
 echo "Dovetail: done!"
 
index 8edce42..7b3ede9 100644 (file)
         - 'dovetail-cleanup'
         - 'dovetail-run'
 
+    wrappers:
+        - fix-workspace-permissions
+
     publishers:
         - archive:
             artifacts: 'results/**/*'