summaryrefslogtreecommitdiffstats
path: root/jjb/global
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2018-08-06 16:10:03 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2018-08-06 16:30:37 +0800
commit3aaed5cf40092744f1b87680b9205a2901baecf3 (patch)
tree03949e5bcc4b74c87760c69744ee0b9a5c5b2b20 /jjb/global
parent50151eb3717edd4ddd996f3705fbe1732de7f3b7 (diff)
clean the workspace in the publisher
As doctor run tox under root user, we need to clean the workspace in the publisher, otherwise the tests which come next will be fail when they operate in the workspace with jenkins user. Change-Id: I14fbabc7516153c6d93e53baf106067ff4194af6 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'jjb/global')
-rw-r--r--jjb/global/releng-macros.yaml20
1 files changed, 20 insertions, 0 deletions
diff --git a/jjb/global/releng-macros.yaml b/jjb/global/releng-macros.yaml
index b282cff4f..d2da7f625 100644
--- a/jjb/global/releng-macros.yaml
+++ b/jjb/global/releng-macros.yaml
@@ -1014,3 +1014,23 @@
- shell:
!include-raw: installer-report.sh
mark-unstable-if-failed: true
+
+- publisher:
+ name: 'post-clean-workspace'
+ publishers:
+ - postbuildscript:
+ builders:
+ - role: SLAVE
+ build-on:
+ - ABORTED
+ - FAILURE
+ - NOT_BUILT
+ - UNSTABLE
+ - SUCCESS
+ build-steps:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+ sudo /bin/rm -rf "$WORKSPACE"