Add build url and ticket IDs to commit message to artifact-metadata CR
Change-Id: Ib06c0706d65dc65736acc124b0d47d033c984cc4
Related-To: PRODX-3678
diff --git a/src/com/mirantis/mk/ReleaseWorkflow.groovy b/src/com/mirantis/mk/ReleaseWorkflow.groovy
index 903ade7..8cb0f51 100644
--- a/src/com/mirantis/mk/ReleaseWorkflow.groovy
+++ b/src/com/mirantis/mk/ReleaseWorkflow.groovy
@@ -157,6 +157,19 @@
|${ChangeId}
""".stripMargin()
+
+ // Add some useful info (if it present) to commit message
+ if (env.BUILD_URL) {
+ commitMessage += "Build-Url: ${env.BUILD_URL}\n"
+ }
+ if (env.GERRIT_CHANGE_COMMIT_MESSAGE) {
+ def jira = new com.mirantis.mk.Atlassian()
+ jira.extractJIRA(env.GERRIT_CHANGE_COMMIT_MESSAGE).each {
+ commitMessage += "Related-To: ${it}\n"
+ }
+ }
+
+
//commit change
git.commitGitChanges(repoDir, commitMessage, changeAuthorEmail, changeAuthorName, false)
//post change