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() } }