Upgrade/install
Change-Id: I4cd16adaabe1248285575019872665fd6d22e11f
diff --git a/update-package.groovy b/update-package.groovy
index 5457718..db5e99c 100644
--- a/update-package.groovy
+++ b/update-package.groovy
@@ -22,16 +22,19 @@
def targetLiveAll
def minions
def result
+def command
def packages
node() {
try {
if (TARGET_PACKAGES != "") {
+ command = "pkg.install"
packages = TARGET_PACKAGES.split(' ')
}
else {
- packages = []
+ command = "pkg.upgrade"
+ packages = null
}
stage('Connect to Salt master') {
@@ -64,7 +67,7 @@
}
stage('Apply package upgrades on sample') {
- salt.runSaltProcessStep(saltMaster, targetLiveSubset, 'pkg.install', packages, null, true)
+ salt.runSaltProcessStep(saltMaster, targetLiveSubset, command, packages, null, true)
}
@@ -75,7 +78,7 @@
}
stage('Apply package upgrades on all nodes') {
- salt.runSaltProcessStep(saltMaster, targetLiveAll, 'pkg.install', packages, null, true)
+ salt.runSaltProcessStep(saltMaster, targetLiveAll, command, packages, null, true)
}
} catch (Throwable e) {