jjb: xci: Ensure GERRIT_TOPIC is always set 75/53675/2
authorMarkos Chandras <mchandras@suse.de>
Tue, 13 Mar 2018 13:28:44 +0000 (13:28 +0000)
committerMarkos Chandras <mchandras@suse.de>
Tue, 13 Mar 2018 13:43:03 +0000 (13:43 +0000)
Fixes the following problem

[description-setter] Description set: Scenario: os-nosdn-nofeature | Node: intel-virtual14
[xci-verify-ubuntu-healthcheck-virtual-master] $ /bin/bash /tmp/jenkins7521920744845291696.sh
/tmp/jenkins7521920744845291696.sh: line 21: GERRIT_TOPIC: unbound variable
Build step 'Execute shell' marked build as failure

Change-Id: Iddf82e6ae6c6c433d941c461953c11935bc45269
Signed-off-by: Markos Chandras <mchandras@suse.de>
jjb/xci/xci-promote.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-start-deployment.sh
jjb/xci/xci-start-new-vm.sh

index 98ad7ff..62818ab 100755 (executable)
@@ -14,6 +14,9 @@
 # what you are doing.
 #----------------------------------------------------------------------
 
+# ensure GERRIT_TOPIC is set
+GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
+
 # skip the healthcheck if the patch doesn't impact the deployment
 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     echo "Skipping the healthcheck!"
index 1bc569a..60b48cf 100755 (executable)
@@ -17,6 +17,9 @@ set -o pipefail
 # what you are doing.
 #----------------------------------------------------------------------
 
+# ensure GERRIT_TOPIC is set
+GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
+
 # skip the healthcheck if the patch doesn't impact the deployment
 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     echo "Skipping the healthcheck!"
index 0628829..102ca41 100755 (executable)
@@ -14,6 +14,9 @@
 # what you are doing.
 #----------------------------------------------------------------------
 
+# ensure GERRIT_TOPIC is set
+GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
+
 # skip the deployment if the patch doesn't impact the deployment
 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     echo "Skipping the deployment!"
index c2f1f99..7874e67 100755 (executable)
@@ -14,6 +14,9 @@
 # what you are doing.
 #----------------------------------------------------------------------
 
+# ensure GERRIT_TOPIC is set
+GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
+
 # skip the deployment if the patch doesn't impact the deployment
 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
     echo "Skipping the deployment!"