Prevent test-wrapper from running backward compatibility tests on gate mode
Also drop redundant code for checking gate inside test-cookiecutter job, as
now it's checking in test-wrapper.
Change-Id: I227d52a8ecea4b587330370ecd695c377aca82e7
diff --git a/test-salt-model-wrapper.groovy b/test-salt-model-wrapper.groovy
index 4dfdcd8..b499db1 100644
--- a/test-salt-model-wrapper.groovy
+++ b/test-salt-model-wrapper.groovy
@@ -191,19 +191,20 @@
if (gerritProject == reclassSystemRepo || gerritProject == cookiecutterTemplatesRepo) {
branchJobName = 'test-mk-cookiecutter-templates'
branches[branchJobName] = runTests(branchJobName, yamlJobParameters(buildTestParams))
+ }
+
+ if (!gateMode) {
// testing backward compatibility
if (gerritBranch == 'master' && gerritProject == reclassSystemRepo) {
def backwardCompatibilityRefsToTest = ['proposed', 'release/2018.11.0', 'release/2019.2.0']
for (String oldRef in backwardCompatibilityRefsToTest) {
- buildTestParams['COOKIECUTTER_TEMPLATE_REF'] = ''
- buildTestParams['COOKIECUTTER_TEMPLATE_BRANCH'] = oldRef
- threadName = "${branchJobName}-${oldRef}"
- branches[threadName] = runTests(branchJobName, yamlJobParameters(buildTestParams), threadName)
+ LinkedHashMap buildTestParamsOld = buildTestParams.clone()
+ buildTestParamsOld['COOKIECUTTER_TEMPLATE_REF'] = ''
+ buildTestParamsOld['COOKIECUTTER_TEMPLATE_BRANCH'] = oldRef
+ String threadName = "${branchJobName}-${oldRef}"
+ branches[threadName] = runTests(branchJobName, yamlJobParameters(buildTestParamsOld), threadName)
}
}
- }
-
- if (!gateMode) {
if (gerritProject == cookiecutterTemplatesRepo) {
branchJobName = 'test-drivetrain'
branches[branchJobName] = runTests(branchJobName, yamlJobParameters(buildTestParams))