xci: Make it possible to skip deployment and healthcheck 93/41793/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 12 Sep 2017 21:27:08 +0000 (15:27 -0600)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 12 Sep 2017 22:03:08 +0000 (16:03 -0600)
This change adds possibility for patch submitters to skip the full
xci-verify if the change doesn't impact the deployment.

Since the patch will be reviewed by others, reviewers can always
ask the submitter to run it through full xci-verify by changing
the topic and posting reverify or recheck as comment to gerrit
change.

The keyword to put in topic branch is skip-verify.

Change-Id: Ib7be71cadd1e1ddff181936ae77753fbfbf3a1d3
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/xci/xci-verify-jobs.yml

index f7dcb99..f0a673b 100644 (file)
         - shell: |
             #!/bin/bash
 
+            # skip the deployment if the patch doesn't impact the deployment
+            if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
+                echo "Skipping the deployment!"
+                exit 0
+            fi
+
             # for some reason, the PATH is not set correctly
             # setting PATH for ansible stuff
             export PATH=/home/jenkins/.local/bin:$PATH
         - shell: |
             #!/bin/bash
 
+            # skip the healthcheck if the patch doesn't impact the deployment
+            if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
+                echo "Skipping the healthcheck!"
+                exit 0
+            fi
+
             echo "Hello World!"
 
 # this will be enabled once the xci is prepared