Switch gating for reclass-system and CC templates on new salt-wrapper
Change-Id: Ie03a24b5dc48c302bec3d2bfe8aa40d11ea6895e
Related-Prod: PROD-25370 (PROD:25370)
diff --git a/gating-pipeline.groovy b/gating-pipeline.groovy
index 15518d4..d449cd8 100644
--- a/gating-pipeline.groovy
+++ b/gating-pipeline.groovy
@@ -19,9 +19,10 @@
}
def callJobWithExtraVars(String jobName) {
- def gerritVars = JsonOutput.toJson(env.getEnvironment().findAll{ it.key.startsWith('GERRIT_') })
+ def gerritVars = env.getEnvironment().findAll{ it.key.startsWith('GERRIT_') }
+ gerritVars['GERRIT_CI_MERGE_TRIGGER'] = true
testJob = build job: jobName, parameters: [
- [$class: 'TextParameterValue', name: 'EXTRA_VARIABLES_YAML', value: gerritVars]
+ [$class: 'TextParameterValue', name: 'EXTRA_VARIABLES_YAML', value: JsonOutput.toJson(gerritVars) ]
]
if (testJob.getResult() != 'SUCCESS') {
error("Gate job ${testJob.getBuildUrl().toString()} finished with ${testJob.getResult()} !")
@@ -56,10 +57,8 @@
gerritProject = gerritProject + "-latest"
}
def testJob = String.format("test-%s-%s", jobsNamespace, gerritProject)
- if (env.GERRIT_PROJECT == 'mk/cookiecutter-templates') {
- callJobWithExtraVars('test-mk-cookiecutter-templates')
- } else if (env.GERRIT_PROJECT == 'salt-models/reclass-system') {
- callJobWithExtraVars('test-salt-model-reclass-system')
+ if (env.GERRIT_PROJECT == 'mk/cookiecutter-templates' || env.GERRIT_PROJECT == 'salt-models/reclass-system') {
+ callJobWithExtraVars('test-salt-model-ci-wrapper')
} else {
if (isJobExists(testJob)) {
common.infoMsg("Test job ${testJob} found, running")