Skip to content

Commit 22c3b76

Browse files
authored
NO-ISSUE: Fix Git tag creation in the weekly deploy Jenkins job execution (#3124)
* Fix Git tag created in the weekly deploy Jenkins Job execution * Fix typo
1 parent 7ef2f20 commit 22c3b76

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.ci/jenkins/Jenkinsfile.weekly.deploy

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,13 @@ pipeline {
158158
script {
159159
projectVersion = getProjectVersion(false)
160160
dir(optaplannerFolder) {
161-
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
161+
if (githubscm.isThereAnyChanges()) {
162+
def commitMsg = "[${getBuildBranch()}] Update version to ${projectVersion}"
163+
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
164+
githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
165+
} else {
166+
println '[WARN] no changes to commit'
167+
}
162168
githubscm.tagRepository(projectVersion)
163169
githubscm.pushRemoteTag('origin', projectVersion, getGitAuthorPushCredsId())
164170
}

0 commit comments

Comments
 (0)