From: Fatih Degirmenci Date: Thu, 7 Feb 2019 09:58:44 +0000 (+0100) Subject: Add global wrapper to fix workspace permissions X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;ds=inline;h=46f97c7b004f5701b9e34069b39117271466ec4d;p=infra%2Fcicd.git Add global wrapper to fix workspace permissions Change-Id: I94008deb3d62d0aa5b69d8aceeab5385a38d4cd3 Signed-off-by: Fatih Degirmenci --- 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: