[feat][core] calculate demo weight according to trigger set
PRODX-10268
Change-Id: Iccc7a72e9ee14a4df235755ab863e87219773223
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 4daa2c9..8d5c545 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -173,6 +173,9 @@
break
}
+ // calculate weight of current demo run to manage lockable resources
+ def demoWeight = (deployChild) ? 2 : 1 // management = 1, child = 1
+
common.infoMsg("""
Use MacOS node as seed: ${seedMacOs}
Child cluster deployment scheduled: ${deployChild}
@@ -191,6 +194,7 @@
BM provider deployment scheduled: ${enableBMDemo}
Multiregional configuration: ${multiregionalMappings}
Service binaries fetching scheduled: ${fetchServiceBinaries}
+ Current weight of the demo run: ${demoWeight} (Used to manage lockable resources)
Triggers: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/""")
return [
useMacOsSeedNode : seedMacOs,
@@ -209,7 +213,8 @@
equinixOnAwsDemoEnabled : equinixOnAwsDemo,
bmDemoEnabled : enableBMDemo,
osDemoEnabled : enableOSDemo,
- multiregionalConfiguration : multiregionalMappings]
+ multiregionalConfiguration : multiregionalMappings,
+ demoWeight : demoWeight]
}
/**