Add pipeline to promote Ubuntu-related mirrors in same time

Change-Id: I1147015ab8a902321797d679af8b3ac55aa7f192
Related-Bug: PROD-20436 (PROD:20436)
diff --git a/promote-mirror-ubuntu-related.groovy b/promote-mirror-ubuntu-related.groovy
new file mode 100644
index 0000000..cd663cf
--- /dev/null
+++ b/promote-mirror-ubuntu-related.groovy
@@ -0,0 +1,27 @@
+/**
+ *
+ * Promote Ubuntu-related mirrors in same time.
+ * Promote ubuntu|maas|maas-ephermal should be always together.
+ *
+ * Expected parameters:
+ *   MCP_VERSION
+ *   SNAPSHOT_NAME - Snapshot name to set
+ *   SNAPSHOT_ID   - Set name for specified snapshot ID
+ */
+
+common = new com.mirantis.mk.Common()
+
+timeout(time: 1, unit: 'HOURS') {
+    node() {
+        stage("Promote") {
+            catchError {
+                for (String jobname : ['mirror-snapshot-name-maas-xenial', 'mirror-snapshot-name-ubuntu', 'mirror-snapshot-name-maas-ephemeral-v3']) {
+                    build job: jobname, parameters: [
+                        [$class: 'StringParameterValue', name: 'SNAPSHOT_NAME', value: SNAPSHOT_NAME],
+                        [$class: 'StringParameterValue', name: 'SNAPSHOT_ID', value: SNAPSHOT_ID],
+                    ]
+                }
+            }
+        }
+    }
+}