Run extra command if defined
Change-Id: I7d6aa4fe0cb3011fb92485a32ecabd8849018e13
diff --git a/deploy-k8s-deployments.groovy b/deploy-k8s-deployments.groovy
index fc33f5b..5a0bf9d 100644
--- a/deploy-k8s-deployments.groovy
+++ b/deploy-k8s-deployments.groovy
@@ -19,6 +19,20 @@
}
stage("Update components") {
common.infoMsg("Setting up components..")
+ def extraCommand
+ try {
+ extraCommand = EXTRA_COMMAND
+ } catch (Throwable e) {
+ extraCommand = null
+ }
+
+ if (extraCommand) {
+ salt.cmdRun(
+ saltMaster,
+ targetExpression,
+ extraCommand
+ )
+ }
out = salt.cmdRun(
saltMaster,
targetExpression,