From 46f97c7b004f5701b9e34069b39117271466ec4d Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Thu, 7 Feb 2019 10:58:44 +0100 Subject: [PATCH] Add global wrapper to fix workspace permissions Change-Id: I94008deb3d62d0aa5b69d8aceeab5385a38d4cd3 Signed-off-by: Fatih Degirmenci --- jjb/global/jjb-macros.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jjb/global/jjb-macros.yaml b/jjb/global/jjb-macros.yaml index 9630a917..f19761d7 100644 --- a/jjb/global/jjb-macros.yaml +++ b/jjb/global/jjb-macros.yaml @@ -216,6 +216,17 @@ timeout-var: 'BUILD_TIMEOUT' fail: true +# wrapper to fix jenkins build workspace permissions +- wrapper: + name: fix-workspace-permissions + wrappers: + - pre-scm-buildstep: + failOnError: true + buildsteps: + - shell: | + #!/bin/bash + sudo chown -R $USER:$USER $WORKSPACE || exit 1 + - publisher: name: notify-slack publishers: -- 2.25.1