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

rantunes pushed a commit to branch 10.0.x
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-images.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new bc090441 kie-issues#1397 - Adjust git tag creation for Apache 10 
release  (#1790)
bc090441 is described below

commit bc090441efe747f72556b4ac50dc66643a14a7af
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Mon Jul 29 08:03:30 2024 -0300

    kie-issues#1397 - Adjust git tag creation for Apache 10 release  (#1790)
    
    * Adjust git tag creation for Apache 10 release
    
    * Add image suffix to the images artifact
---
 .ci/jenkins/Jenkinsfile.build-image |  2 +-
 .ci/jenkins/Jenkinsfile.deploy      | 89 +++----------------------------------
 2 files changed, 6 insertions(+), 85 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.build-image 
b/.ci/jenkins/Jenkinsfile.build-image
index 2a9407b5..91b55369 100644
--- a/.ci/jenkins/Jenkinsfile.build-image
+++ b/.ci/jenkins/Jenkinsfile.build-image
@@ -208,7 +208,7 @@ pipeline {
             }
             steps {
                 script {
-                    def resultingFileName = 
"incubator-kie-${getImageArtifactReleaseVersion()}-${getBuildImageName()}.tar.gz"
+                    def resultingFileName = 
"incubator-kie-${getImageArtifactReleaseVersion()}-${getBuildImageName()}-image.tar.gz"
                     def signatureFileName = "${resultingFileName}.asc"
                     sh """
                         docker pull ${getBuiltImageTag()}
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index a6e20a77..c4385436 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -18,8 +18,6 @@
 
 deployProperties = [:]
 
-changesDone = false
-
 BUILT_IMAGES = Collections.synchronizedList([])
 BUILD_FAILED_IMAGES = Collections.synchronizedList([])
 TEST_FAILED_IMAGES = Collections.synchronizedList([])
@@ -73,22 +71,6 @@ pipeline {
             }
         }
 
-        stage('Prepare for PR') {
-            when {
-                expression { return isRelease() }
-            }
-            steps {
-                script {
-                    dir(getRepoName()) {
-                        if (githubscm.isBranchExist('origin', getPRBranch())) {
-                            githubscm.removeRemoteBranch('origin', 
getPRBranch(), getGitAuthorPushCredsId())
-                        }
-                        githubscm.createBranch(getPRBranch())
-                    }
-                }
-            }
-        }
-
         stage('Setup Quarkus platform version') {
             when {
                 expression { isRelease() }
@@ -124,7 +106,7 @@ pipeline {
                         }
                         sh versionCmd
 
-                        commitAndPushChanges("Update project version to 
${getProjectVersion()}")
+                        commitAndTagChanges("[${getBuildBranch()}] Update 
version to ${getProjectVersion()}")
                     }
                 }
             }
@@ -172,67 +154,6 @@ pipeline {
                 }
             }
         }
-
-        stage('Create PR') {
-            when {
-                expression {
-                    return changesDone && isRelease()
-                }
-            }
-            steps {
-                script {
-                    dir(getRepoName()) {
-                        def commitMsg = "[${getBuildBranch()}] Update Maven 
artifacts"
-                        def prBody = "Generated by build ${BUILD_TAG}: 
${BUILD_URL}."
-                        if (isRelease()) {
-                            commitMsg = "[${getBuildBranch()}] Update project 
version to ${getProjectVersion()}"
-                            prBody += '\nPlease do not merge, it should be 
merged automatically.'
-                        } else if (currentBuild.currentResult != 'SUCCESS') {
-                            commitMsg += " (${currentBuild.currentResult})"
-                            prBody += '\n\nSuccessful images:\n'
-                            getBuiltImages().each {
-                                prBody += "- ${it}\n"
-                            }
-                            if (getBuildFailedImages()) {
-                                prBody += '\nBuild failures on those images:\n'
-                                getBuildFailedImages().each {
-                                    prBody += "- ${it}\n"
-                                }
-                            } else {
-                                prBody += '\nImages were all successfully 
built but some other problem occured in the pipeline execution...\n'
-                            }
-                            if (getTestFailedImages()) {
-                                prBody += '\nTest failures on those images:\n'
-                                getTestFailedImages().each {
-                                    prBody += "- ${it}\n"
-                                }
-                            } else {
-                                prBody += '\nImages were all successfully 
built but some other problem occured in the pipeline execution...\n'
-                            }
-                            prBody += '\nSee build url above for more 
information'
-                        }
-                        String prLink = githubscm.createPR(commitMsg, prBody, 
getBuildBranch(), getGitAuthorPushCredsId())
-                        deployProperties["${getRepoName()}.pr.link"] = prLink
-
-                        // Create a new tag
-                        
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
-                        githubscm.tagRepository(getGitTagName())
-                        githubscm.pushRemoteTag('origin', getGitTagName(), 
getGitAuthorPushCredsId())
-                    }
-                }
-            }
-            post {
-                always {
-                    script {
-                        
setDeployPropertyIfNeeded("${getRepoName()}.pr.source.uri", 
"https://github.com/${getGitAuthor()}/${getRepoName()}")
-                        
setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getPRBranch())
-                        
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.uri", 
"https://github.com/${getGitAuthor()}/${getRepoName()}")
-                        
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.ref", getBuildBranch())
-                        setDeployPropertyIfNeeded("${getRepoName()}.tag.name", 
getGitTagName())
-                    }
-                }
-            }
-        }
         stage('Finalize') {
             steps {
                 script {
@@ -283,11 +204,11 @@ void checkoutRepo() {
     checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), 
getBuildBranch(), false, getGitAuthorCredsId()))
 }
 
-void commitAndPushChanges(String commitMsg) {
+void commitAndTagChanges(String commitMsg) {
     githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
     githubscm.commitChanges(commitMsg)
-    githubscm.pushObject('origin', getPRBranch(), getGitAuthorPushCredsId())
-    changesDone = true
+    githubscm.tagRepository(getGitTagName())
+    githubscm.pushRemoteTag('origin', getGitTagName(), 
getGitAuthorPushCredsId())
 }
 
 void createBuildAndTestStageClosure(String image) {
@@ -363,7 +284,7 @@ List getTestFailedImages() {
 ////////////////////////////////////////////////////////////////////////
 
 boolean isDeployImage() {
-    return !Boolean.valueOf(env.DISABLE_IMAGES_DEPLOY)
+    return !env.DISABLE_IMAGES_DEPLOY
 }
 
 boolean isDeployImageInOpenshiftRegistry() {


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

Reply via email to