Skip to content

Commit

Permalink
NO-ISSUE: Fix Git tag creation in the weekly deploy Jenkins job execu…
Browse files Browse the repository at this point in the history
…tion (#3124)

* Fix Git tag created in the weekly deploy Jenkins Job execution

* Fix typo
  • Loading branch information
rodrigonull authored Sep 10, 2024
1 parent 7ef2f20 commit 22c3b76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .ci/jenkins/Jenkinsfile.weekly.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ pipeline {
script {
projectVersion = getProjectVersion(false)
dir(optaplannerFolder) {
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
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 22c3b76

Please sign in to comment.