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

ricardozanini pushed a commit to branch radtriste-fix-pipelines
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-images.git

commit 7dde50ed95ddcaa9fa87cdd1c86f240b35e1ba2d
Author: radtriste <[email protected]>
AuthorDate: Tue Oct 17 10:48:36 2023 +0200

    updated Jenkinsfile
---
 .ci/jenkins/Jenkinsfile | 46 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
index 693fa00c..3bc37e89 100644
--- a/.ci/jenkins/Jenkinsfile
+++ b/.ci/jenkins/Jenkinsfile
@@ -2,7 +2,10 @@
 
 pipeline {
     agent {
-        label 'ubuntu'
+        docker { 
+            image env.AGENT_DOCKER_BUILDER_IMAGE
+            args env.AGENT_DOCKER_BUILDER_ARGS
+        }
     }
     options {
         timeout(time: 120, unit: 'MINUTES')
@@ -11,45 +14,44 @@ pipeline {
         stage('Initialization') {
             steps {
                 script {
-                    clean()
-
                     sh 'printenv'
                     
-                    githubscm.checkoutIfExists(getRepoName(), 
getChangeAuthor(), getChangeBranch(), 'apache', getChangeTarget(), true)
+                    dir(getRepoName()) {
+                        githubscm.checkoutIfExists(getRepoName(), 
getChangeAuthor(), getChangeBranch(), 'apache', getChangeTarget(), true)
+                    }
                 }
             }
         }
         stage('Validate CeKit Image and Modules descriptors') {
             steps {
                 script {
-                    sh '''
-                        curl -Ls 
https://github.com/kiegroup/kie-cloud-tools/releases/download/v1.3.6/cekit-image-validator-runner.tgz
 --output cekit-image-validator-runner.tgz
-                        tar -xzvf cekit-image-validator-runner.tgz
-                        chmod +x cekit-image-validator-runner
-                    '''
-                    sh './cekit-image-validator-runner modules/'
-                    getImages().each { image -> sh 
"./cekit-image-validator-runner ${image}-image.yaml" }
+                    dir(getRepoName()) {
+                        sh '''
+                            curl -Ls 
https://github.com/kiegroup/kie-cloud-tools/releases/download/v1.3.6/cekit-image-validator-runner.tgz
 --output cekit-image-validator-runner.tgz
+                            tar -xzvf cekit-image-validator-runner.tgz
+                            chmod +x cekit-image-validator-runner
+                        '''
+                        sh './cekit-image-validator-runner modules/'
+                        getImages().each { image -> sh 
"./cekit-image-validator-runner ${image}-image.yaml" }
+                    }
                 }
             }
         }
         stage('Build & Test Images') {
             steps {
                 script {
-                    parallelStages = [:]
-                    for(String image : getImages()){
-                        parallelStages[image] = 
createBuildAndTestStageClosure(image)
+                    dir(getRepoName()) {
+                        parallelStages = [:]
+                        for(String image : getImages()){
+                            parallelStages[image] = 
createBuildAndTestStageClosure(image)
+                        }
+                        parallel parallelStages
                     }
-                    parallel parallelStages
                 }
             }
         }
     }
     post {
-        always {
-            script {
-                clean()
-            }
-        }
         unsuccessful {
             script {
                 pullrequest.postComment(util.getMarkdownTestSummary('PR', 
"${BUILD_URL}", 'GITHUB'))
@@ -58,10 +60,6 @@ pipeline {
     }
 }
 
-void clean() {
-    util.cleanNode()
-}
-
 Closure createBuildAndTestStageClosure(String image) {
     return {
         stage("Build&Test ${image}") {


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

Reply via email to