run highstate to finalize only when requested
Finalize stage can be requested by settings STACK_INSTALL="finalize, ..."
Change-Id: Icfaa33d7f1559dfd98542c3d902f48c692b9f114
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index e35e815..110a4e1 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -365,15 +365,12 @@
}
}
- stage('Finalize') {
- if (STACK_INSTALL != '') {
- try {
- salt.runSaltProcessStep(saltMaster, '*', 'state.apply', [], null, true)
- } catch (Exception e) {
- common.warningMsg('State apply failed but we should continue to run')
- }
+ if (common.checkContains('STACK_INSTALL', 'finalize')) {
+ stage('Finalize') {
+ salt.runSaltProcessStep(saltMaster, '*', 'state.apply', [], null, true)
}
}
+
} catch (Throwable e) {
currentBuild.result = 'FAILURE'
throw e