summaryrefslogtreecommitdiffstats
path: root/jjb/xci/xci-daily-jobs.yml
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-03-21 12:46:51 +0000
committerMarkos Chandras <mchandras@suse.de>2017-03-22 20:10:27 +0000
commit139d2fb3d8aebafbd7194b3465f92c415971db39 (patch)
tree54d4a0f4d0d7d9297dbf0c7e01aaddf730a78f5f /jjb/xci/xci-daily-jobs.yml
parent93f8e7738646d917347a54b08f161e6e752de4ef (diff)
jjb: xci: Fix permissions in workspace before removing it
From time to time we end up in the unfortunate situation where the jenkins job breaks for random reasons and the logs are left with 'root' permissions. On the next run, the job fails again but this time it's because Jenkins does not have enough permissions to delete them. We workaround this by fixing up the permissions before removing the workspace. Change-Id: I2fda20ded527bac73605ffa5818a2c44bf6c9026 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'jjb/xci/xci-daily-jobs.yml')
-rw-r--r--jjb/xci/xci-daily-jobs.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/jjb/xci/xci-daily-jobs.yml b/jjb/xci/xci-daily-jobs.yml
index 65da308ae..ce2e4f382 100644
--- a/jjb/xci/xci-daily-jobs.yml
+++ b/jjb/xci/xci-daily-jobs.yml
@@ -96,6 +96,9 @@
triggers:
- '{auto-trigger-name}'
+ wrappers:
+ - xci-fix-perms-workspace
+
builders:
- description-setter:
description: "Built on $NODE_NAME"
@@ -181,10 +184,25 @@
name: SLAVE_LABEL
default: '{slave-label}'
+ wrappers:
+ - xci-fix-perms-workspace
+
builders:
- description-setter:
description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
- 'xci-{phase}-builder'
+
+#---------------------------
+# wrapper macros
+#---------------------------
+- wrapper:
+ name: xci-fix-perms-workspace
+ wrappers:
+ - pre-scm-buildstep:
+ - shell: |
+ #!/bin/bash
+ sudo -R chown $USER $WORKSPACE || exit 1
+
#---------------------------
# builder macros
#---------------------------