Add STORAGES argument for promotion job
Change-Id: Iead8c57fc71eb9d0ef61beaffa3c6f9f17a1e6c9
diff --git a/aptly-promote-pipeline.groovy b/aptly-promote-pipeline.groovy
index dfc764e..9a5da58 100644
--- a/aptly-promote-pipeline.groovy
+++ b/aptly-promote-pipeline.groovy
@@ -16,11 +16,20 @@
components = ""
}
+def storages
+try {
+ storages = STORAGES.tokenize(',')
+} catch (MissingPropertyException e) {
+ storages = ['local']
+}
+
node() {
try{
stage("promote") {
lock("aptly-api") {
- aptly.promotePublish(APTLY_URL, SOURCE, TARGET, RECREATE, components, packages, DIFF_ONLY, '-d --timeout 600', DUMP_PUBLISH.toBoolean())
+ for (storage in storages) {
+ aptly.promotePublish(APTLY_URL, SOURCE, TARGET, RECREATE, components, packages, DIFF_ONLY, '-d --timeout 600', DUMP_PUBLISH.toBoolean(), storage)
+ }
}
}
} catch (Throwable e) {