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/openstack-compute-upgrade.groovy b/openstack-compute-upgrade.groovy
index a59fc08..2984b55 100644
--- a/openstack-compute-upgrade.groovy
+++ b/openstack-compute-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).
  *
 **/
 
@@ -96,8 +97,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") {
@@ -136,8 +139,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"
@@ -180,10 +185,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?"
                 }
+              }
             }
 
             stage("Add new repos on all targeted nodes") {