Allow to pass cluster_name heat param

Heat templates accepts cluster_name param that defines name
of cluster to use. This patch allows to pass cluster_name via
STACK_CLUSTER_NAME job variable to avoid using same heat template
with different clusters.

Change-Id: Iab5b28ab10b094feb027c274acd5dbf8e6154174
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index ad46e2f..a37a655 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -18,6 +18,7 @@
  *   STACK_CLEANUP_JOB          Name of job for deleting stack
  *
  *   STACK_COMPUTE_COUNT        Number of compute nodes to launch
+ *   STACK_CLUSTER_NAME         The name of cluster model to use
  *   STATIC_MGMT_NETWORK        Check if model contains static IP address definitions for all nodes
  *
  *   AWS_STACK_REGION           CloudFormation AWS region
@@ -194,6 +195,12 @@
                             envParams.put('cfg_extra_formulas', EXTRA_FORMULAS)
                         }
 
+                        // add cluster name if specified
+                        if (common.validInputParam('STACK_CLUSTER_NAME')) {
+                            common.infoMsg("Setting cluster_name to ${STACK_CLUSTER_NAME}")
+                            envParams.put('cluster_name', STACK_CLUSTER_NAME)
+                        }
+
                         openstack.createHeatStack(openstackCloud, STACK_NAME, STACK_TEMPLATE, envParams, HEAT_STACK_ENVIRONMENT, venv)
                     }