[core-ci] Add trigger for cache warmup
PRODX-29421
Change-Id: I957575840b5ddcdc69ce499c4927733770b61cce
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 7d4d19f..21f7ea8 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -123,6 +123,7 @@
def aioCluster = env.AIO_CLUSTER ? env.AIO_CLUSTER.toBoolean() : false
def useVsphereVvmtObjects = env.VSPHERE_USE_VVMT_OBJECTS ? env.VSPHERE_USE_VVMT_OBJECTS.toBoolean() : false
def enableBv2Smoke = true
+ def runCacheWarmup = env.CACHE_WARMUP_ENABLED ? env.CACHE_WARMUP_ENABLED.toBoolean() : 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.*/) {
@@ -387,6 +388,15 @@
aioCluster = true
}
+ if (commitMsg ==~ /(?s).*\[cache-warmup\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*cache-warmup.*/) {
+ runCacheWarmup = true
+ }
+
+ if (runCacheWarmup && (!deployChild && !mosDeployChild)) {
+ runCacheWarmup = false
+ common.errorMsg('Child cluster deployment is not enabled, skipping Cache Warmup')
+ }
+
// multiregional tests
def multiRegionalMatches = (commitMsg =~ /(\[multiregion\s*.*?\])/)
if (multiRegionalMatches.size() > 0) {
@@ -536,6 +546,7 @@
AIO cluster: ${aioCluster}
Use Vsphere VVMT Objects: ${useVsphereVvmtObjects}
Bootsrap v2 smoke checks enabled: ${enableBv2Smoke}
+ Run Cache warmup for child clusters: ${runCacheWarmup}
Triggers: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/hack/ci-gerrit-keywords.md""")
return [
osCloudLocation : openstackIMC,
@@ -599,7 +610,9 @@
enableFips : enableFips,
aioCluster : aioCluster,
useVsphereVvmtObjects : useVsphereVvmtObjects,
- bv2SmokeEnabled : enableBv2Smoke]
+ bv2SmokeEnabled : enableBv2Smoke,
+ runCacheWarmup : runCacheWarmup,
+ ]
}
/**