Ignore cluster model encrypt for syntax tests
* Encryption part not really needed infor syntax tests,
and will be perfomed during actual cluster generation
Change-Id: I5a77beb58f8beb643655b2a0edabf7aef7d79f94
Prod-related: PROD-28180 (PROD:28180)
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index ac6b918..e054646 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -232,7 +232,7 @@
sh "git clone --mirror https://github.com/Mirantis/mk-pipelines.git ${pipelineEnv}/mk-pipelines"
sh "git clone --mirror https://github.com/Mirantis/pipeline-library.git ${pipelineEnv}/pipeline-library"
args = [
- "--user-data user_data", , "--model ${modelEnv}",
+ "--user-data user_data", "--model ${modelEnv}",
"--mk-pipelines ${pipelineEnv}/mk-pipelines/", "--pipeline-library ${pipelineEnv}/pipeline-library/"
]
if (context['secrets_encryption_enabled'] == 'True') {
diff --git a/test-cookiecutter-reclass.groovy b/test-cookiecutter-reclass.groovy
index e530bdc..67d5181 100644
--- a/test-cookiecutter-reclass.groovy
+++ b/test-cookiecutter-reclass.groovy
@@ -15,8 +15,8 @@
import groovy.json.JsonOutput
common = new com.mirantis.mk.Common()
+mcpCommon = new com.mirantis.mcp.Common()
gerrit = new com.mirantis.mk.Gerrit()
-git = new com.mirantis.mk.Git()
python = new com.mirantis.mk.Python()
extraVarsYAML = env.EXTRA_VARIABLES_YAML.trim() ?: ''
@@ -132,7 +132,14 @@
return {
for (contextFile in _contextFileList) {
def basename = common.GetBaseName(contextFile, '.yml')
- def context = readFile(file: "${_templateEnvDir}/contexts/${contextFile}")
+ def contextYaml = readYaml text: readFile(file: "${_templateEnvDir}/contexts/${contextFile}")
+ // secrets_encryption overcomplicated for expected 'fast syntax tests'
+ // So, lets disable it. It would be tested only in generate-cookiecutter-products.groovy pipeline
+ if (contextYaml['default_context'].get('secrets_encryption_enabled')) {
+ common.warningMsg('Disabling secrets_encryption_enabled for tests!')
+ contextYaml['default_context']['secrets_encryption_enabled'] = 'False'
+ }
+ context = mcpCommon.dumpYAML(contextYaml)
if (!fileExists(new File(_templateEnvDir, 'tox.ini').toString())) {
common.warningMsg('Forming NEW reclass-root structure...')
python.generateModel(context, basename, 'cfg01', _virtualenv, "${_templateEnvDir}/model", _templateEnvDir)