We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ef2f20 commit 22c3b76Copy full SHA for 22c3b76
.ci/jenkins/Jenkinsfile.weekly.deploy
@@ -158,7 +158,13 @@ pipeline {
158
script {
159
projectVersion = getProjectVersion(false)
160
dir(optaplannerFolder) {
161
- githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
+ 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
+ }
168
githubscm.tagRepository(projectVersion)
169
githubscm.pushRemoteTag('origin', projectVersion, getGitAuthorPushCredsId())
170
}
0 commit comments