Merge "Pass DockerContainerName to tests"
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 0a2888e..84e24f9 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -169,7 +169,8 @@
             stage("Test") {
                 if (sharedReclassUrl != "" && TEST_MODEL && TEST_MODEL.toBoolean()) {
                     sh("cp -r ${modelEnv} ${testEnv}")
-                    saltModelTesting.setupAndTestNode("${saltMaster}.${clusterDomain}", "", testEnv)
+                    def DockerCname = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
+                    saltModelTesting.setupAndTestNode("${saltMaster}.${clusterDomain}", "", testEnv, dockerContainerName=DockerCname)
                 }
             }
 
diff --git a/test-cookiecutter-reclass.groovy b/test-cookiecutter-reclass.groovy
index 14c49be..f21d5d6 100644
--- a/test-cookiecutter-reclass.groovy
+++ b/test-cookiecutter-reclass.groovy
@@ -96,7 +96,8 @@
     while (nbTry < 5) {
         nbTry++
         try {
-            saltModelTesting.setupAndTestNode("cfg01.${clusterDomain}", clusterName, EXTRA_FORMULAS, testEnv, "pkg", DISTRIB_REVISION)
+            def DockerCname = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
+            saltModelTesting.setupAndTestNode("cfg01.${clusterDomain}", clusterName, EXTRA_FORMULAS, testEnv, "pkg", DISTRIB_REVISION, dockerContainerName=DockerCname)
             break
         } catch (Exception e) {
             if (e.getMessage() == "script returned exit code 124") {
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 7fc333d..0398e8a 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -64,7 +64,8 @@
             def workspace = common.getWorkspace()
             common.infoMsg("Running salt model test for node ${NODE_TARGET} in cluster ${CLUSTER_NAME}")
             try {
-              saltModelTesting.setupAndTestNode(NODE_TARGET, CLUSTER_NAME, EXTRA_FORMULAS, workspace, FORMULAS_SOURCE, FORMULAS_REVISION, RECLASS_VERSION, MAX_CPU_PER_JOB.toInteger(), RECLASS_IGNORE_CLASS_NOTFOUND, LEGACY_TEST_MODE, APT_REPOSITORY, APT_REPOSITORY_GPG)
+              def DockerCname = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
+              saltModelTesting.setupAndTestNode(NODE_TARGET, CLUSTER_NAME, EXTRA_FORMULAS, workspace, FORMULAS_SOURCE, FORMULAS_REVISION, RECLASS_VERSION, MAX_CPU_PER_JOB.toInteger(), RECLASS_IGNORE_CLASS_NOTFOUND, LEGACY_TEST_MODE, APT_REPOSITORY, APT_REPOSITORY_GPG, dockerContainerName=DockerCName)
             } catch (Exception e) {
               if (e.getMessage() == "script returned exit code 124") {
                 common.errorMsg("Impossible to test node due to timeout of salt-master, ABORTING BUILD")