Merge "Refactor release-mcp pipelines"
diff --git a/release-mcp-version.groovy b/release-mcp-version.groovy
index 7c30f30..744936f 100644
--- a/release-mcp-version.groovy
+++ b/release-mcp-version.groovy
@@ -56,11 +56,12 @@
]
}
-def triggerGitTagJob(gitRepoList, gitCredentials, tag) {
+def triggerGitTagJob(gitRepoList, gitCredentials, tag, source_tag) {
build job: "tag-git-repos-stable", parameters: [
[$class: 'StringParameterValue', name: 'GIT_REPO_LIST', value: gitRepoList],
[$class: 'StringParameterValue', name: 'GIT_CREDENTIALS', value: gitCredentials],
- [$class: 'StringParameterValue', name: 'TAG', value: tag]
+ [$class: 'StringParameterValue', name: 'TAG', value: tag],
+ [$class: 'StringParameterValue', name: 'SOURCE_TAG', value: source_tag],
]
}
diff --git a/tag-git-repos.groovy b/tag-git-repos.groovy
index 550a2a1..68229a6 100644
--- a/tag-git-repos.groovy
+++ b/tag-git-repos.groovy
@@ -6,6 +6,7 @@
* GIT_REPO_LIST
* GIT_CREDENTIALS
* TAG
+ * SOURCE_TAG initial commit\tag to be tagged with TAG
*
*/
@@ -38,6 +39,11 @@
repoName = repoArray[0]
repoUrl = repoArray[1]
repoCommit = repoArray[2]
+ if (repoCommit.contains('SUBS_SOURCE_REF')) {
+ common.warningMsg("Replacing SUBS_SOURCE_REF => ${SOURCE_TAG}")
+ repoCommit.replace('SUBS_SOURCE_REF', SOURCE_TAG
+ )
+ }
gitRepoAddTag(repoUrl, repoName, TAG, GIT_CREDENTIALS, repoCommit)
}
} catch (Throwable e) {