From 1c6bc54504da1d2ce52df1775c6c44ad11bd0e33 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 14 Jan 2019 21:51:59 +0100 Subject: Jenkins: allow regular user to clean 'build/' directory --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index fc08eff2..32ddcd65 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,6 +55,9 @@ pipeline { post { always { echo 'One way or another, I have finished' + // the 'build' directory got elevated permissions during the build + // cdjust permissions so it can be cleaned up by the regular user + sh 'sudo chmod -R 777 build/' deleteDir() /* cleanup our workspace */ } } -- cgit v1.2.3 From 2003c0c276f66d9761180dd42ef37102a3634349 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 14 Jan 2019 22:00:05 +0100 Subject: Jenkins: move post always to post cleanup section --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 32ddcd65..b5210544 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ pipeline { } post { - always { + cleanup { echo 'One way or another, I have finished' // the 'build' directory got elevated permissions during the build // cdjust permissions so it can be cleaned up by the regular user -- cgit v1.2.3