Add INTERACTIVE flag to upgrade pipelines
This patch adds INTERACTIVE boolean flag to the following pipelines:
* openstack-compute-upgrade.groovy
* openstack-control-upgrade.groovy
* ovs-gateway-upgrade.groovy
Change-Id: I5f0c8130df323aa5d79823bc719117a229ab8f1b
Related-Prod: PROD-20951
diff --git a/ovs-gateway-upgrade.groovy b/ovs-gateway-upgrade.groovy
index 8d131c8..87cf828 100644
--- a/ovs-gateway-upgrade.groovy
+++ b/ovs-gateway-upgrade.groovy
@@ -7,6 +7,7 @@
* TARGET_SERVERS Salt compound target to match nodes to be updated [*, G@osfamily:debian].
* TARGET_SUBSET_TEST Number of nodes to list package updates, empty string means all targetted nodes.
* TARGET_SUBSET_LIVE Number of selected nodes to live apply selected package update.
+ * INTERACTIVE Ask interactive questions during pipeline run (bool).
*
**/
@@ -63,8 +64,10 @@
salt.runSaltProcessStep(pepperEnv, targetTestSubset, 'pkg.list_upgrades', [], null, true)
}
- stage('Confirm upgrade on sample nodes') {
+ if (INTERACTIVE.toBoolean()){
+ stage('Confirm upgrade on sample nodes') {
input message: "Please verify the list of packages that you want to be upgraded. Do you want to continue with upgrade?"
+ }
}
stage("Add new repos on sample nodes") {
@@ -81,8 +84,10 @@
}
}
- stage('Confirm upgrade on sample') {
+ if (INTERACTIVE.toBoolean()){
+ stage('Confirm upgrade on sample') {
input message: "Please verify if there are packages that it wants to downgrade. If so, execute apt-cache policy on them and verify if everything is fine. Do you want to continue with upgrade?"
+ }
}
command = "cmd.run"
@@ -111,10 +116,12 @@
}
}
- stage('Confirm upgrade on all targeted nodes') {
+ if (INTERACTIVE.toBoolean()){
+ stage('Confirm upgrade on all targeted nodes') {
timeout(time: 2, unit: 'HOURS') {
- input message: "Verify that the upgraded sample nodes are working correctly. If so, do you want to approve live upgrade on ${targetLiveAll} nodes?"
+ input message: "Verify that the upgraded sample nodes are working correctly. If so, do you want to approve live upgrade on ${targetLiveAll} nodes?"
}
+ }
}
stage("Add new repos on all targeted nodes") {