Use SALT_OVERRIDES parameter

Change-Id: If66aeb9dafb5ff3a881b7853a72c81f6f9baf284
Depends-on: I54ef1ff6ccfeac68ed4514819f926899d191cedb
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 4b1a521..69f75d0 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -37,6 +37,7 @@
  *
  *   K8S_API_SERVER             Kubernetes API address
  *   K8S_CONFORMANCE_IMAGE      Path to docker image with conformance e2e tests
+ *   SALT_OVERRIDES             YAML with overrides for Salt deployment
  *
  *   TEMPEST_IMAGE_LINK         Tempest image link
  *
@@ -184,6 +185,13 @@
                 saltMaster = salt.connection(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
             }
 
+            // Set up override params
+            if (env.getEnvironment().containsKey('SALT_OVERRIDES')) {
+                stage('Set Salt overrides') {
+                    salt.setSaltOverrides(saltMaster,  SALT_OVERRIDES)
+                }
+            }
+
             //
             // Install
             //
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index a1d84c1..3094e58 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -40,6 +40,7 @@
  *   TEMPEST_IMAGE_LINK         Tempest image link
  *
  * optional parameters for overwriting soft params
+ *   SALT_OVERRIDES              YAML with overrides for Salt deployment
  *   KUBERNETES_HYPERKUBE_IMAGE  Docker repository and tag for hyperkube image
  *   CALICO_CNI_IMAGE            Docker repository and tag for calico CNI image
  *   CALICO_NODE_IMAGE           Docker repository and tag for calico node image
@@ -155,6 +156,12 @@
                 saltMaster = salt.connection(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
             }
 
+            // Set up override params
+            if (env.getEnvironment().containsKey('SALT_OVERRIDES')) {
+                stage('Set Salt overrides') {
+                    salt.setSaltOverrides(saltMaster,  SALT_OVERRIDES)
+                }
+            }
             //
             // Install
             //
@@ -175,6 +182,7 @@
             // install k8s
             if (common.checkContains('STACK_INSTALL', 'k8s')) {
 
+                // Deprecated stage. Use SALT_OVERRIDES instead.
                 stage('Overwrite Kubernetes parameters') {
 
                     // Overwrite Kubernetes vars if specified