Skip to content

Commit

Permalink
kie-issues#1397 - Adjust git tag creation for Apache 10 release (#6032)
Browse files Browse the repository at this point in the history
* Adjust git tag creation for Apache 10 release

* Adjust git tag creation for Apache 10 release
  • Loading branch information
rodrigonull authored Jul 29, 2024
1 parent e18154a commit 79332e3
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pipeline {
}
stage('Prepare for PR') {
when {
expression { return isRelease() || isCreatePr() }
expression { return isCreatePr() }
}
steps {
script {
Expand Down Expand Up @@ -149,7 +149,7 @@ pipeline {
}
stage('Create PR') {
when {
expression { return isRelease() || isCreatePr() }
expression { return isCreatePr() }
}
steps {
script {
Expand All @@ -159,11 +159,6 @@ pipeline {
} else {
println '[WARN] no changes to commit'
}

// Create a new tag
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.tagRepository(getGitTagName())
githubscm.pushRemoteTag('origin', getGitTagName(), getGitAuthorPushCredsId())
}
}
}
Expand All @@ -178,6 +173,29 @@ 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')
githubscm.findAndStageNotIgnoredFiles('antora.yml')
})
} else {
println '[WARN] no changes to commit'
}
githubscm.tagRepository(getGitTagName())
githubscm.pushRemoteTag('origin', getGitTagName(), getGitAuthorPushCredsId())
}
}
}
}
}
post {
always {
Expand Down

0 comments on commit 79332e3

Please sign in to comment.