Add build pkg-promote in Promote MCP job
Change-Id: I6bd8448cb55860045591de6acaed0ccdb6c62355
diff --git a/release-mcp-version.groovy b/release-mcp-version.groovy
index 665a170..bd19b02 100644
--- a/release-mcp-version.groovy
+++ b/release-mcp-version.groovy
@@ -88,6 +88,31 @@
]
}
+def triggerPkgPromoteJob(PkgRepoList, PromoteFrom, PromoteTo) {
+ def repos = PkgRepoList.trim().tokenize()
+ def RepoName, RepoDist, PackagesToPromote
+ for (repo in repos) {
+ if(repo.startsWith('#')){
+ common.warningMsg("Skipping repo ${repo}")
+ continue
+ }
+ if(repo.trim().indexOf(' ') == -1){
+ throw new IllegalArgumentException("Wrong format of repository and commit input")
+ }
+ repoArray = repo.trim().tokenize(' ')
+ RepoName = repoArray[0]
+ RepoDist = repoArray[1]
+ PackagesToPromote = repoArray[2]
+ build job: "pkg-promote", parameters: [
+ [$class: 'ChoiceParameterValue', name: 'repoName', value: RepoName],
+ [$class: 'ChoiceParameterValue', name: 'repoDist', value: RepoDist],
+ [$class: 'ChoiceParameterValue', name: 'promoteFrom', value: PromoteFrom],
+ [$class: 'ChoiceParameterValue', name: 'promoteTo', value: PromoteTo],
+ [$class: 'TextParameterValue', name: 'packagesToPromote', value: PackagesToPromote],
+ ]
+ }
+}
+
def triggerSyncVCPJob(VcpImageList, targetTag) {
// Operation must be synced with triggerPromoteVCPJob procedure!
def images = VcpImageList.trim().tokenize()
@@ -117,6 +142,11 @@
triggerAptlyPromoteJob(APTLY_URL, 'all', false, true, 'all', false, "(.*)/${SOURCE_REVISION}", APTLY_STORAGES, "{0}/${TARGET_REVISION}")
}
+ if (PKG_PROMOTE.toBoolean() && SOURCE_REVISION == 'testing') {
+ common.infoMsg("Promoting Extra and Ceph packages")
+ triggerPkgPromoteJob(PKG_REPO_LIST, SOURCE_REVISION, TARGET_REVISION)
+ }
+
if (RELEASE_DEB_MIRRORS.toBoolean()) {
common.infoMsg("Promoting Debmirrors")
triggerMirrorRepoJob(SOURCE_REVISION, TARGET_REVISION)