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/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index 200ae8d..354d59e 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -66,6 +66,8 @@
# Needed for using different models in different templates
{% set CLUSTER_NAME = os_env('CLUSTER_NAME', LAB_CONFIG_NAME) %}
+# Ubuntu-postEOL updates by cloudlinux
+{% set UPDATES_MIRANTIS_VERSION = os_env('UPDATES_MIRANTIS_VERSION', '') %}
{%- macro MACRO_INSTALL_PACKAGES_ON_NODES(NODE_NAME) %}
{#####################################################}
@@ -426,6 +428,10 @@
{%- if JENKINS_PIPELINE_BRANCH != '' %}
echo "JENKINS_PIPELINE_BRANCH={{ JENKINS_PIPELINE_BRANCH }}"
{%- endif %}
+ {%- if UPDATES_MIRANTIS_VERSION != '' %}
+ echo "UPDATES_MIRANTIS_VERSION={{ UPDATES_MIRANTIS_VERSION }}"
+ {%- endif %}
+
echo "======================================="
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
@@ -517,6 +523,10 @@
find ${REPLACE_DIRS} -type f -exec sed -i 's/==IPV4_NET_TENANT_PREFIX==/{{ IPV4_NET_TENANT_PREFIX }}/g' {} +
find ${REPLACE_DIRS} -type f -exec sed -i 's/==IPV4_NET_EXTERNAL_PREFIX==/{{ IPV4_NET_EXTERNAL_PREFIX }}/g' {} +
+ {%- if UPDATES_MIRANTIS_VERSION != '' %}
+ sed -i "s/updates_mirantis_version:.*/updates_mirantis_version: '{{ UPDATES_MIRANTIS_VERSION }}'/g" {{ CLUSTER_CONTEXT_PATH }}
+ {%- endif %}
+
{% set items = CLUSTER_PRODUCT_MODELS or '$(ls /root/cookiecutter-templates/cluster_product/)' %}
mkdir -p /tmp/output /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/
# Allow to use encryption keys