This is an automated email from the ASF dual-hosted git repository.

jstastnycz pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-pipelines.git


The following commit(s) were added to refs/heads/main by this push:
     new 59bbe619 kie-issues#760: disableDeferredWipeout in util.cleanNode 
(#1144)
59bbe619 is described below

commit 59bbe6199427cf70f099b71d586771a39a19a8c2
Author: Jan Stastny <[email protected]>
AuthorDate: Tue Dec 12 14:02:19 2023 +0100

    kie-issues#760: disableDeferredWipeout in util.cleanNode (#1144)
    
    * kie-issues#760: disableDeferredWipeout in util.cleanNode
    
    * fix tests
    
    ---------
    
    Co-authored-by: jstastny-cz <[email protected]>
---
 jenkins-pipeline-shared-libraries/test/vars/UtilSpec.groovy | 6 +++---
 jenkins-pipeline-shared-libraries/vars/util.groovy          | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/jenkins-pipeline-shared-libraries/test/vars/UtilSpec.groovy 
b/jenkins-pipeline-shared-libraries/test/vars/UtilSpec.groovy
index f91bb290..20316e2b 100644
--- a/jenkins-pipeline-shared-libraries/test/vars/UtilSpec.groovy
+++ b/jenkins-pipeline-shared-libraries/test/vars/UtilSpec.groovy
@@ -380,7 +380,7 @@ class UtilSpec extends JenkinsPipelineSpecification {
         then:
         0 * getPipelineMock('cloud.cleanContainersAndImages')(_)
         1 * getPipelineMock('maven.cleanRepository')()
-        1 * getPipelineMock('cleanWs.call')()
+        1 * getPipelineMock('cleanWs.call')(_)
     }
 
     def "[util.groovy] cleanNode with docker"() {
@@ -389,7 +389,7 @@ class UtilSpec extends JenkinsPipelineSpecification {
         then:
         1 * getPipelineMock('cloud.cleanContainersAndImages')('docker')
         1 * getPipelineMock('maven.cleanRepository')()
-        1 * getPipelineMock('cleanWs.call')()
+        1 * getPipelineMock('cleanWs.call')(_)
     }
 
     def "[util.groovy] cleanNode with podman"() {
@@ -398,7 +398,7 @@ class UtilSpec extends JenkinsPipelineSpecification {
         then:
         1 * getPipelineMock('cloud.cleanContainersAndImages')('podman')
         1 * getPipelineMock('maven.cleanRepository')()
-        1 * getPipelineMock('cleanWs.call')()
+        1 * getPipelineMock('cleanWs.call')(_)
     }
 
     def "[util.groovy] replaceInAllFilesRecursive"() {
diff --git a/jenkins-pipeline-shared-libraries/vars/util.groovy 
b/jenkins-pipeline-shared-libraries/vars/util.groovy
index 94ba17e2..091fe3fd 100644
--- a/jenkins-pipeline-shared-libraries/vars/util.groovy
+++ b/jenkins-pipeline-shared-libraries/vars/util.groovy
@@ -208,7 +208,7 @@ void executeWithCredentialsMap(Map credentials, Closure 
closure) {
 
 void cleanNode(String containerEngine = '') {
     println '[INFO] Clean workspace'
-    cleanWs()
+    cleanWs(disableDeferredWipeout: true)
     println '[INFO] Workspace cleaned'
     println '[INFO] Cleanup Maven artifacts'
     maven.cleanRepository()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to