Reconfigure updates.mirantis versioning setting
- Use stable updates repo for released jobs
- Add UPDATES_MIRANTIS_VERSION jenkins param
- Add ability to overwrite repo version in context (upgrade
pre-deployment)
- Set repo version to 'staging' during MCP drivetrain upgrade
Change-Id: I99d70b6802a0215acf8533909f71b7d9f0784621
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index c01c80f..5ec2627 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -226,11 +226,32 @@
salt_actions.run_state("*", "saltutil.refresh_pillar")
+@pytest.fixture(scope='class')
+def switch_to_staging_updates_mirantis_repo(reclass_actions, salt_actions):
+ version_param = "parameters._param.updates_mirantis_version"
+ infra_yml = "cluster/*/infra/init.yml"
+
+ current_version = reclass_actions.get_key(version_param, infra_yml)
+ if current_version == 'staging':
+ LOG.info("updates.mirantis.com already set to 'staging', skipping")
+ return
+ if current_version is None:
+ LOG.info("updates.mirantis.com is not enabled, "
+ "skipping /staging repo pillar")
+ return
+
+ LOG.info("Switch to updates.mirantis.com/staging repo")
+ reclass_actions.add_key(version_param, 'staging', infra_yml)
+
+ salt_actions.run_state("*", "saltutil.refresh_pillar")
+
+
@pytest.mark.usefixtures("switch_to_proposed_pipelines",
"update_to_tag",
"wa_for_galera_clustercheck_password_prod35705",
"wa_for_alerta_password_prod35958",
- "wa_redis_server_version_3_prod36960")
+ "wa_redis_server_version_3_prod36960",
+ "switch_to_staging_updates_mirantis_repo")
class TestUpdateMcpCluster(object):
"""
Following the steps in