[Asterisk-code-review] CI: Fix missing script block in jenkinsfiles (asterisk[master])

George Joseph asteriskteam at digium.com
Tue Nov 19 12:16:43 CST 2019


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13264 )

Change subject: CI: Fix missing script block in jenkinsfiles
......................................................................

CI: Fix missing script block in jenkinsfiles

Change-Id: I9f44a3d5085ea7880fad1a3883a4820907e29ea3
(cherry picked from commit 95213b01d2d5e72e38b40c30fa5d0c8cf4b37b16)
---
M tests/CI/gates.jenkinsfile
M tests/CI/periodics-daily.jenkinsfile
M tests/CI/ref_debug.jenkinsfile
3 files changed, 12 insertions(+), 6 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 284b0fe..e52d3a4 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -240,8 +240,10 @@
 	}
 	post {
 		cleanup {
-			if (env.CLEANUP_WS_GATES.toBoolean()) {
-				cleanWs deleteDirs: true, notFailBuild: false
+			script {
+				if (env.CLEANUP_WS_GATES.toBoolean()) {
+					cleanWs deleteDirs: true, notFailBuild: false
+				}
 			}
 		}
 		/*
diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile
index 4934c12..11e9ed3 100644
--- a/tests/CI/periodics-daily.jenkinsfile
+++ b/tests/CI/periodics-daily.jenkinsfile
@@ -159,8 +159,10 @@
 	}
 	post {
 		cleanup {
-			if (env.CLEANUP_WS_DAILIES.toBoolean()) {
-				cleanWs deleteDirs: true, notFailBuild: false
+			script {
+				if (env.CLEANUP_WS_DAILIES.toBoolean()) {
+					cleanWs deleteDirs: true, notFailBuild: false
+				}
 			}
 		}
 		success {
diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile
index a2bfdba..31fc85d 100644
--- a/tests/CI/ref_debug.jenkinsfile
+++ b/tests/CI/ref_debug.jenkinsfile
@@ -129,8 +129,10 @@
 	}
 	post {
 		cleanup {
-			if (env.CLEANUP_WS_REF_DEBUG.toBoolean()) {
-				cleanWs deleteDirs: true, notFailBuild: false
+			script {
+				if (env.CLEANUP_WS_REF_DEBUG.toBoolean()) {
+					cleanWs deleteDirs: true, notFailBuild: false
+				}
 			}
 		}
 		success {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13264
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I9f44a3d5085ea7880fad1a3883a4820907e29ea3
Gerrit-Change-Number: 13264
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Friendly Automation
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191119/7d2f2cdb/attachment-0001.html>


More information about the asterisk-code-review mailing list