Skip to content

Commit

Permalink
Fix Git tag created in the weekly deploy Jenkins Job execution
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigonull committed Sep 9, 2024
1 parent 7ef2f20 commit 09d211b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .ci/jenkins/Jenkinsfile.weekly.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,14 @@ pipeline {
steps {
script {
projectVersion = getProjectVersion(false)
dir(optaplannerFolder) {
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
dir(optaplannerFolder)) {
if (githubscm.isThereAnyChanges()) {
def commitMsg = "[${getBuildBranch()}] Update version to ${projectVersion}"
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
} else {
println '[WARN] no changes to commit'
}
githubscm.tagRepository(projectVersion)
githubscm.pushRemoteTag('origin', projectVersion, getGitAuthorPushCredsId())
}
Expand Down

0 comments on commit 09d211b

Please sign in to comment.