Revert "Refactor collecting YAML containing gerrit params"
This reverts commit dc339858b95ab930650a68aca844633f7133f4e5.
Change-Id: I198acf89ca0838e606c0490506849a0c159cc32b
diff --git a/test-system-reclass-pipeline.groovy b/test-system-reclass-pipeline.groovy
index a8e10b7..04eafeb 100644
--- a/test-system-reclass-pipeline.groovy
+++ b/test-system-reclass-pipeline.groovy
@@ -1,5 +1,3 @@
-import groovy.json.JsonOutput
-
def gerrit = new com.mirantis.mk.Gerrit()
def common = new com.mirantis.mk.Common()
@@ -9,7 +7,12 @@
if (extraVarsYaml != '') {
common.mergeEnv(env, extraVarsYaml)
} else {
- extraVarsYaml = JsonOutput.toJson(env.getEnvironment().findAll{ it.key.startsWith('GERRIT_') })
+ extraVarsYaml = '\n---'
+ for (envVar in env.getEnvironment()) {
+ if (envVar.key.startsWith("GERRIT_")) {
+ extraVarsYaml += "\n${envVar.key}: '${envVar.value}'"
+ }
+ }
}
def slaveNode = env.SLAVE_NODE ?: 'python&&docker'