From bb753e6cf44a4120a4a7899b96cab91068bef80e Mon Sep 17 00:00:00 2001 From: Jan Stastny Date: Thu, 2 Nov 2023 15:28:09 +0100 Subject: [PATCH] kie-issues#667: fix cleanup and settingsXml handling (#273) Co-authored-by: jstastny-cz --- .ci/jenkins/Jenkinsfile.branch | 24 ++++++++++++------------ .ci/jenkins/Jenkinsfile.bump-up-version | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.branch b/.ci/jenkins/Jenkinsfile.branch index f01076f8..8d3c792e 100644 --- a/.ci/jenkins/Jenkinsfile.branch +++ b/.ci/jenkins/Jenkinsfile.branch @@ -14,7 +14,7 @@ pipeline { agent { label "$AGENT_LABEL" } - options{ + options { timestamps() } tools { @@ -24,7 +24,7 @@ pipeline { stages { stage('CleanWorkspace') { steps { - cleanWs() + cleanWs(disableDeferredWipeout: true) } } stage('clone kie-benchmarks') { @@ -34,27 +34,27 @@ pipeline { } } } - stage('create new branch'){ - steps{ - dir("${WORKSPACE}/${benchmarksRepo}"){ - script{ + stage('create new branch') { + steps { + dir("${WORKSPACE}/${benchmarksRepo}") { + script { githubscm.createBranch(NEW_BRANCH) } } } } - stage('push new branch'){ - steps{ - dir("${WORKSPACE}/${benchmarksRepo}"){ - script{ + stage('push new branch') { + steps { + dir("${WORKSPACE}/${benchmarksRepo}") { + script { githubscm.pushObject('origin', NEW_BRANCH) } } } } } - post{ - always{ + post { + cleanup { cleanWs() } } diff --git a/.ci/jenkins/Jenkinsfile.bump-up-version b/.ci/jenkins/Jenkinsfile.bump-up-version index 9ebfa8db..471254f7 100644 --- a/.ci/jenkins/Jenkinsfile.bump-up-version +++ b/.ci/jenkins/Jenkinsfile.bump-up-version @@ -26,7 +26,7 @@ pipeline { stage('Initialize') { steps { script { - cleanWs() + cleanWs(disableDeferredWipeout: true) dir("${repoName}") { deleteDir() @@ -52,8 +52,8 @@ pipeline { } } } - post{ - always{ + post { + cleanup { cleanWs() } }