add HEAT_STACK_REUSE parameter
Change-Id: I4f03e4e70265a2e88e42bb99017a90ea41c1a822
diff --git a/mk-lab-pipeline.groovy b/mk-lab-pipeline.groovy
index 45676ed..28d72b3 100644
--- a/mk-lab-pipeline.groovy
+++ b/mk-lab-pipeline.groovy
@@ -13,6 +13,7 @@
* HEAT_STACK_PUBLIC_NET Heat stack floating IP pool
* HEAT_STACK_DELETE Delete Heat stack when finished (bool)
* HEAT_STACK_CLEANUP_JOB Name of job for deleting Heat stack
+ * HEAT_STACK_REUSE Reuse Heat stack (don't create one)
*
* SALT_MASTER_CREDENTIALS Credentials to the Salt API
*
@@ -65,12 +66,14 @@
openstack.getKeystoneToken(openstackCloud, openstackEnv)
}
- stage('Launch new Heat stack') {
- envParams = [
- 'availability_zone': HEAT_STACK_ZONE,
- 'public_net': HEAT_STACK_PUBLIC_NET
- ]
- openstack.createHeatStack(openstackCloud, HEAT_STACK_NAME, HEAT_STACK_TEMPLATE, envParams, HEAT_STACK_ENVIRONMENT, openstackEnv)
+ if (HEAT_STACK_REUSE == 'false') {
+ stage('Launch new Heat stack') {
+ envParams = [
+ 'availability_zone': HEAT_STACK_ZONE,
+ 'public_net': HEAT_STACK_PUBLIC_NET
+ ]
+ openstack.createHeatStack(openstackCloud, HEAT_STACK_NAME, HEAT_STACK_TEMPLATE, envParams, HEAT_STACK_ENVIRONMENT, openstackEnv)
+ }
}
stage('Connect to Salt master') {