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-runtimes.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 87feb69775 Adjust git tag creation for Apache 10 release (#3592)
87feb69775 is described below

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

    Adjust git tag creation for Apache 10 release (#3592)
---
 .ci/jenkins/Jenkinsfile.deploy | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 034cce9841..6dfa58756e 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -90,7 +90,7 @@ pipeline {
         }
         stage('Prepare for PR') {
             when {
-                expression { return isRelease() || isCreatePr() }
+                expression { return isCreatePr() }
             }
             steps {
                 script {
@@ -160,7 +160,6 @@ pipeline {
                             
mavenCommand.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
                                 .run("clean $installOrDeploy")
                         }
-
                     }
                 }
             }
@@ -175,7 +174,7 @@ pipeline {
         }
         stage('Create PR') {
             when {
-                expression { return isRelease() || isCreatePr() }
+                expression { return isCreatePr() }
             }
             steps {
                 script {
@@ -185,11 +184,6 @@ pipeline {
                         } else {
                             println '[WARN] no changes to commit'
                         }
-
-                        // Create a new tag
-                        
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
-                        githubscm.tagRepository(getGitTagName())
-                        githubscm.pushRemoteTag('origin', getGitTagName(), 
getGitAuthorPushCredsId())
                     }
                 }
             }
@@ -204,6 +198,26 @@ pipeline {
                 }
             }
         }
+        stage('Commit and Create Tag') {
+            when {
+                expression { return isRelease() }
+            }
+            steps {
+                script {
+                    dir(getRepoName()) {
+                        if (githubscm.isThereAnyChanges()) {
+                            def commitMsg = "[${getBuildBranch()}] Update 
version to ${getProjectVersion()}"
+                            
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
+                            githubscm.commitChanges(commitMsg, { 
githubscm.findAndStageNotIgnoredFiles('pom.xml') })
+                        } else {
+                            println '[WARN] no changes to commit'
+                        }
+                        githubscm.tagRepository(getGitTagName())
+                        githubscm.pushRemoteTag('origin', getGitTagName(), 
getGitAuthorPushCredsId())
+                    }
+                }
+            }
+        }
     }
     post {
         always {


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

Reply via email to