Introduces a new trigger "multipatch-build:" which can be used to
trigger a build from a Gerrit comment rather than requiring committers
to have Jenkins access. Patch parameters are passed through a 1 liner
after the colon of the trigger.
Change-Id: I4c269d3db11a80d981209ef9b1b4ff428f1b7741
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
- opendaylight-infra-wrappers:
build-timeout: '1200'
- opendaylight-infra-wrappers:
build-timeout: '1200'
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on:
+ - comment-added-contains-event:
+ comment-contains-value: 'multipatch-build:'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '**'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+
builders:
- wipe-org-opendaylight-repo
- integration-multipatch-builder
builders:
- wipe-org-opendaylight-repo
- integration-multipatch-builder
export GIT_COMMITTER_NAME="Multipatch Job"
# TODO: Is "patches" still the correct word?
export GIT_COMMITTER_NAME="Multipatch Job"
# TODO: Is "patches" still the correct word?
-IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}"
+if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then
+ PATCHES=($(echo "$GERRIT_EVENT_COMMENT_TEXT" \
+ | grep 'multipatch-build:' | awk -F: '{print $2}'))
+else
+ IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}"
+fi
# For each patch:
# * Clone the project.
# For each patch:
# * Clone the project.