Support recheck and reverify in global-jjb 05/10705/6
authorAric Gardner <agardner@linuxfoundation.org>
Thu, 17 May 2018 20:05:51 +0000 (16:05 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 11 Jul 2018 16:14:41 +0000 (12:14 -0400)
In OPNFV we are using reverify as a convention (we also support recheck)
This was previously deprecated in global-jjb
But I'm adding it back to not confuse our users

Change-Id: Ie794636e49f97ff2ac2735e81c407b57a3470f55
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
jjb/lf-ci-jobs.yaml
jjb/lf-maven-jobs.yaml
jjb/lf-node-jobs.yaml
jjb/lf-python-jobs.yaml
jjb/lf-rtd-jobs.yaml
shell/gerrit-fetch-dependencies.sh

index ed6a5c5..be00255 100644 (file)
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'JJB Verify'
           permit-all: true
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'INFO File Verify'
           permit-all: true
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'Packer Verify'
           permit-all: true
index b1872a1..5e33b89 100644 (file)
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: ^(recheck|reverify)$
           only-trigger-phrase: false
           status-context: 'Maven Javadoc Verify'
           permit-all: true
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
+
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
         pattern: '.*'
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'Maven Verify'
           permit-all: true
index fb27ed7..106fbdc 100644 (file)
@@ -97,7 +97,7 @@
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'Node Verify'
           permit-all: true
index e55f11c..f95f575 100644 (file)
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'Tox Verify'
           permit-all: true
index 3c21dbc..dd6301d 100644 (file)
           exclude-no-code-change: false
       - draft-published-event
       - comment-added-contains-event:
-          comment-contains-value: recheck$
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
 
     #####################
     # Job Configuration #
 
     triggers:
       - github-pull-request:
-          trigger-phrase: '^recheck$'
+          trigger-phrase: '^(recheck|reverify)$'
           only-trigger-phrase: false
           status-context: 'RTD Verify'
           permit-all: true
index 1cb5177..30ba7c8 100644 (file)
@@ -13,6 +13,8 @@
 # Takes a list of Gerrit patches and fetches all projects and cherry-pick
 # patches for projects. The trigger is
 #     'recheck: SPACE_SEPERATED_LIST_OF_PATCHES'
+#     or
+#     'reverify: SPACE_SEPERATED_LIST_OF_PATCHES'
 #
 # NOTE: This script assumes the user will provide the correct dependency order
 #       via the PATCHES list.
@@ -22,7 +24,7 @@ set -eu -o pipefail
 
 REPOS_DIR="$WORKSPACE/.repos"
 
-IFS=" " read -r -a PATCHES <<< "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'recheck:' | awk -F: '{print $2}')"
+IFS=" " read -r -a PATCHES <<< "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep -E '(recheck:|reverify:)' | awk -F: '{print $2}')"
 
 # Workaround for git-review bug in v1.24
 # https://storyboard.openstack.org/#!/story/2001081