run highstate to finalize only when requested
Finalize stage can be requested by settings STACK_INSTALL="finalize, ..."
Change-Id: Icfaa33d7f1559dfd98542c3d902f48c692b9f114
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index 4e70930..e2f7ebf 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -318,14 +318,9 @@
}
}
- 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')
- throw e
- }
+ if (common.checkContains('STACK_INSTALL', 'finalize')) {
+ stage('Finalize') {
+ salt.runSaltProcessStep(saltMaster, '*', 'state.apply', [], null, true)
}
}
} catch (Throwable e) {