Dont install formula-updates for release only tests

 * check, if we are going to test clear release version
   and don't enable salt-formulas/update repo

Change-Id: Ia06c6ebb65cd0a81f6aaf22076d3bcc7e26b98d7
Prod-related: PROD-29904 (PROD:29904)
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 54e9853..c572041 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -15,6 +15,7 @@
 git = new com.mirantis.mk.Git()
 python = new com.mirantis.mk.Python()
 saltModelTesting = new com.mirantis.mk.SaltModelTesting()
+updateSaltFormulasDuringTest = true
 
 slaveNode = env.getProperty('SLAVE_NODE') ?: 'virtual'
 gerritCredentials = env.getProperty('CREDENTIALS_ID') ?: 'gerrit'
@@ -22,7 +23,6 @@
 distribRevision = 'proposed'
 gitGuessedVersion = false
 
-
 def globalVariatorsUpdate() {
     def templateContext = readYaml text: env.COOKIECUTTER_TEMPLATE_CONTEXT
     def context = templateContext['default_context']
@@ -81,8 +81,11 @@
         common.warningMsg('Apply WA for PROD-25732')
         context.cookiecutter_template_url = 'ssh://gerrit.mcp.mirantis.com:29418/mk/cookiecutter-templates.git'
     }
-    common.warningMsg("Fetching:\n" +
-        "DISTRIB_REVISION from ${distribRevision}")
+    // check, if we are going to test clear release version, w\o any updates and patches
+    if (!gitGuessedVersion && (distribRevision == context.mcp_version)) {
+        updateSaltFormulasDuringTest = false
+    }
+
     common.infoMsg("Using context:\n" + context)
     print prettyPrint(toJson(context))
     return context
@@ -194,7 +197,9 @@
                         sh("cp -v gpgkey.asc ${testEnv}/salt_master_pillar.asc")
                     }
                     def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
-                    common.infoMsg("Attempt to run test against distribRevision: ${distribRevision}")
+                    common.warningMsg("Attempt to run test against:\n" +
+                        "DISTRIB_REVISION from ${distribRevision}\n" +
+                        "updateSaltFormulasDuringTest = ${updateSaltFormulasDuringTest}")
                     try {
                         def config = [
                             'dockerHostname'     : "${context['salt_master_hostname']}",
@@ -203,7 +208,8 @@
                             'distribRevision'    : distribRevision,
                             'dockerContainerName': DockerCName,
                             'testContext'        : 'salt-model-node',
-                            'dockerExtraOpts'    : ['--memory=3g']
+                            'dockerExtraOpts'    : ['--memory=3g'],
+                            'updateSaltFormulas' : updateSaltFormulasDuringTest
                         ]
                         testResult = saltModelTesting.testNode(config)
                         common.infoMsg("Test finished: SUCCESS")