Add MAKE_SNAPSHOT_STAGES job parameters
- add MAKE_SNAPSHOT_STAGES to the parent and children jobs,
True by default
- MAKE_SNAPSHOT_STAGES is always disabled for ENV_MANAGER='heat'
Change-Id: I2f1a8ae6cdc2f1be7a0d133d764ed3446305507a
diff --git a/jobs/pipelines/swarm-deploy-cicd.groovy b/jobs/pipelines/swarm-deploy-cicd.groovy
index 1939b4d..b5e1ff7 100644
--- a/jobs/pipelines/swarm-deploy-cicd.groovy
+++ b/jobs/pipelines/swarm-deploy-cicd.groovy
@@ -11,6 +11,7 @@
* STACK_INSTALL_TIMEOUT Stacks installation timeout
* TCP_QA_REFS Reference to the tcp-qa change on review.gerrithub.io, like refs/changes/46/418546/41
* SHUTDOWN_ENV_ON_TEARDOWN optional, shutdown fuel-devops environment at the end of the job
+ * MAKE_SNAPSHOT_STAGES optional, use "dos.py snapshot" to snapshot stages
*
*/
@@ -18,6 +19,7 @@
common = new com.mirantis.mk.Common()
shared = new com.mirantis.system_qa.SharedPipeline()
+make_snapshot_stages = "${env.MAKE_SNAPSHOT_STAGES}" != "false" ? true : false
if (! env.PARENT_NODE_NAME) {
error "'PARENT_NODE_NAME' must be set from the parent deployment job!"
@@ -55,8 +57,11 @@
stage("Sanity check the deployed component [${stack}]") {
shared.sanity_check_component(stack)
}
- stage("Make environment snapshot [${stack}_deployed]") {
- shared.devops_snapshot(stack)
+
+ if (make_snapshot_stages) {
+ stage("Make environment snapshot [${stack}_deployed]") {
+ shared.devops_snapshot(stack)
+ }
}
} // for
@@ -68,10 +73,12 @@
// TODO(ddmitriev): analyze the "def currentResult = currentBuild.result ?: 'SUCCESS'"
// and report appropriate data to TestRail
// TODO(ddmitriev): add checks for cicd cluster
- if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "true") {
- shared.run_cmd("""\
- dos.py destroy ${ENV_NAME}
- """)
+ if (make_snapshot_stages) {
+ if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "true") {
+ shared.run_cmd("""\
+ dos.py destroy ${ENV_NAME}
+ """)
+ }
}
}