Switch salt-formulas repository to mirror.mirantis.com
- Set MCP_SALT_REPO_URL and MCP_SALT_REPO_KEY in the user-data
for cfg01 node *only* if the values are non-empty.
If values are empty, defaults from mcp-common-scripts will be used.
- Fix the URLs in the shared-salt.yaml to use mirror.mirantis.com
- Cleanup the cookied-model-generator from unused values
Change-Id: I1582f82aa4755f0b11de747b54fa6977eeb78d5b
diff --git a/jobs/pipelines/swarm-create-cfg-config-drive.groovy b/jobs/pipelines/swarm-create-cfg-config-drive.groovy
index 72d278f..46d5010 100644
--- a/jobs/pipelines/swarm-create-cfg-config-drive.groovy
+++ b/jobs/pipelines/swarm-create-cfg-config-drive.groovy
@@ -152,7 +152,10 @@
stage("Set data"){
for (i in entries(smc)) {
- sh "sed -i \"s,export ${i[0]}=.*,export ${i[0]}=${i[1]},\" ${user_data_script_path}"
+ // Replace only if the variable is non-empty, leave default otherwise
+ if (i[1]) {
+ sh "sed -i \"s,export ${i[0]}=.*,export ${i[0]}=${i[1]},\" ${user_data_script_path}"
+ }
}
}