You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ra...@apache.org on 2024/07/29 11:03:06 UTC
(incubator-kie-kogito-apps) branch 10.0.x updated: Adjust git tag creation for Apache 10 release (#2082)
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-apps.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new 9e3672926 Adjust git tag creation for Apache 10 release (#2082)
9e3672926 is described below
commit 9e3672926e256ad34f14639854c88f4f50ce047d
Author: Rodrigo Antunes <co...@rodrigoantunes.com.br>
AuthorDate: Mon Jul 29 08:03:01 2024 -0300
Adjust git tag creation for Apache 10 release (#2082)
---
.ci/jenkins/Jenkinsfile.deploy | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 9fdd39b27..cd4562b40 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -69,7 +69,7 @@ pipeline {
}
stage('Prepare for PR') {
when {
- expression { return isRelease() || isCreatePr() }
+ expression { return isCreatePr() }
}
steps {
script {
@@ -138,7 +138,7 @@ pipeline {
}
stage('Create PR') {
when {
- expression { return isRelease() || isCreatePr() }
+ expression { return isCreatePr() }
}
steps {
script {
@@ -148,11 +148,6 @@ pipeline {
} else {
println '[WARN] no changes to commit'
}
-
- // Create a new tag
- githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
- githubscm.tagRepository(getGitTagName())
- githubscm.pushRemoteTag('origin', getGitTagName(), getGitAuthorPushCredsId())
}
}
}
@@ -167,6 +162,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 {
@@ -211,11 +226,7 @@ void checkoutRepo() {
void commitAndCreatePR() {
def commitMsg = "[${getBuildBranch()}] Update version to ${getProjectVersion()}"
def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}."
- if (isRelease()) {
- prBody += '\nPlease do not merge, it should be merged automatically after testing.'
- } else {
- prBody += '\nPlease review and merge.'
- }
+ prBody += '\nPlease review and merge.'
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
githubscm.pushObject('origin', getPRBranch(), getGitAuthorPushCredsId())
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org