Skip to content

Commit 8068bee

Browse files
committed
[core] Support upgradeplan flows for child upgrade
Related: PRODX-47821 Change-Id: I2803b13ee480317f2c20ad66752e49a5035b512d
1 parent 22d0559 commit 8068bee

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/com/mirantis/mk/KaasUtils.groovy

+18
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def checkDeploymentTestSuite() {
107107
def runRuntimeMigrateExtendedTestChild = env.RUN_CHILD_RUNTIME_MIGRATE_EXTENDED_TEST ? env.RUN_CHILD_RUNTIME_MIGRATE_EXTENDED_TEST.toBoolean() : false
108108
def runRuntimeMigrateQuickTestChild = env.RUN_CHILD_RUNTIME_MIGRATE_QUICK_TEST ? env.RUN_CHILD_RUNTIME_MIGRATE_QUICK_TEST.toBoolean() : false
109109
def runRuntimeMigrateAndRollbackTestChild = env.RUN_CHILD_RUNTIME_MIGRATE_AND_ROLLBACK_TEST ? env.RUN_CHILD_RUNTIME_MIGRATE_AND_ROLLBACK_TEST.toBoolean() : false
110+
def upgradeChildPlanSeq = env.UPGRADE_CHILD_PLAN_SEQ ? env.UPGRADE_CHILD_PLAN_SEQ.toBoolean() : false
111+
def upgradeChildPlanBulk = env.UPGRADE_CHILD_PLAN_BULK ? env.UPGRADE_CHILD_PLAN_BULK.toBoolean() : false
110112
// multiregion configuration from env variable: comma-separated string in form $mgmt_provider,$regional_provider
111113
def multiregionalMappings = env.MULTIREGION_SETUP ? multiregionWorkflowParser(env.MULTIREGION_SETUP) : [
112114
enabled: false,
@@ -182,6 +184,16 @@ def checkDeploymentTestSuite() {
182184
//TODO: revert after start testing the two-step upgrade again (PRODX-33510)
183185
//fullUpgradeChild = true
184186
}
187+
if (commitMsg ==~ /(?s).*\[child-upgrade-plan-sequental\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-upgrade-plan-sequental.*/) {
188+
deployChild = true
189+
upgradeChild = true
190+
upgradeChildPlanSeq = true
191+
}
192+
if (commitMsg ==~ /(?s).*\[child-upgrade-plan-bulk\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-upgrade-plan-bulk.*/) {
193+
deployChild = true
194+
upgradeChild = true
195+
upgradeChildPlanBulk = true
196+
}
185197
if ((upgradeMgmt || autoUpgradeMgmt) && deployChild) {
186198
upgradeChild = true
187199
common.warningMsg('child upgrade is automatically enabled as mgmt upgrade and child deploy are enabled')
@@ -735,6 +747,8 @@ def checkDeploymentTestSuite() {
735747
Child runtime migration (extended) enabled: ${runRuntimeMigrateExtendedTestChild}
736748
Child runtime migration (quick) enabled: ${runRuntimeMigrateQuickTestChild}
737749
Child runtime migration (extended) with rollback enabled: ${runRuntimeMigrateAndRollbackTestChild}
750+
Child Upgrade via update plan with sequental steps enabled: ${upgradeChildPlanSeq}
751+
Child Upgrade via update plan with bulk steps enabled: ${upgradeChildPlanBulk}
738752
Triggers: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/hack/ci-gerrit-keywords.md""")
739753
return [
740754
osCloudLocation : openstackIMC,
@@ -824,6 +838,8 @@ def checkDeploymentTestSuite() {
824838
runtimeMigrateExtendedChildEnabled : runRuntimeMigrateExtendedTestChild,
825839
runtimeMigrateQuickChildEnabled : runRuntimeMigrateQuickTestChild,
826840
runtimeMigrateChildAndRollbackEnabled : runRuntimeMigrateAndRollbackTestChild,
841+
upgradeChildPlanSeqEnabled : upgradeChildPlanSeq,
842+
upgradeChildPlanBulkEnabled : upgradeChildPlanBulk,
827843
]
828844
}
829845

@@ -1159,6 +1175,8 @@ def triggerPatchedComponentDemo(component, patchSpec = '', configurationFile = '
11591175
booleanParam(name: 'RUN_CHILD_RUNTIME_MIGRATE_EXTENDED_TEST', value: triggers.runtimeMigrateExtendedChildEnabled),
11601176
booleanParam(name: 'RUN_CHILD_RUNTIME_MIGRATE_QUICK_TEST', value: triggers.runtimeMigrateQuickChildEnabled),
11611177
booleanParam(name: 'RUN_CHILD_RUNTIME_MIGRATE_AND_ROLLBACK_TEST', value: triggers.runtimeMigrateChildAndRollbackEnabled),
1178+
booleanParam(name: 'UPGRADE_CHILD_PLAN_SEQ', value: triggers.upgradeChildPlanSeqEnabled),
1179+
booleanParam(name: 'UPGRADE_CHILD_PLAN_BULK', value: triggers.upgradeChildPlanBulkEnabled),
11621180
]
11631181

11641182
// customize multiregional demo

0 commit comments

Comments
 (0)