[Core CI] public-ci-sync trigger
PRODX-44055
Change-Id: Iedd95036df23089d20aca6838f23f176842ca46d
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index b8cfa0d..880e365 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -142,6 +142,9 @@
def enableBv2Smoke = true
def runCacheWarmup = env.CACHE_WARMUP_ENABLED ? env.CACHE_WARMUP_ENABLED.toBoolean() : false
def cveScan = false
+ // Sync to public CDN is triggered automatically for corresponding scenarios
+ // This trigger is used only for on-demand cases
+ def publicCISync = false
def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : ''
if (commitMsg ==~ /(?s).*\[mgmt-proxy\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-proxy.*/) {
@@ -401,6 +404,11 @@
common.errorMsg('CVE Scan job enabled')
}
+ if (commitMsg ==~ /(?s).*\[public-ci-sync\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*public-ci-sync\.*/) {
+ publicCISync = true
+ common.errorMsg('Sync to public-ci CDN is enabled')
+ }
+
def slackChannelMatches = (commitMsg =~ /(\[slack-channel\s*[#@](\S+)])/)
if (slackChannelMatches.size() > 0) {
// override chanenel notify when it set explicitly
@@ -674,6 +682,7 @@
Keycloak+LDAP integration enabled: ${coreKeycloakLdap}
NTP update job scheduled: ${runNTPUpdateTest}
MCC MariaDB Backup/Restore test enabled: ${runMCCMariaBackupRestoreTest}
+ Sync to public-ci CDN enabled: ${publicCISync}
Triggers: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/hack/ci-gerrit-keywords.md""")
return [
osCloudLocation : openstackIMC,
@@ -755,6 +764,7 @@
internalNTPServersEnabled : configureInternalNTP,
runNTPUpdateTestEnabled : runNTPUpdateTest,
runMCCMariaBackupRestoreTestEnabled : runMCCMariaBackupRestoreTest,
+ publicCISyncEnabled : publicCISync,
]
}