From: Thanh Ha Date: Wed, 6 Sep 2017 23:23:28 +0000 (-0400) Subject: Add trigger for launching release job via comment X-Git-Tag: v0.9.0~10 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=11b2f87f626f38368e1406c38a37cde8134a5301;p=releng%2Fglobal-jjb.git Add trigger for launching release job via comment Allows the release job to be triggered via Gerrit / GitHub PR comment. This allows contributors to initiate a release build without needing permissions via Jenkins directly. Issue: RELENG-426 Change-Id: I2c75f607cc57471afb49fa0347bb130af214ea4b Signed-off-by: Thanh Ha --- diff --git a/.jjb-test/expected-xml/gerrit-maven-maven-release-master b/.jjb-test/expected-xml/gerrit-maven-maven-release-master index dd4d3e85..191c7810 100644 --- a/.jjb-test/expected-xml/gerrit-maven-maven-release-master +++ b/.jjb-test/expected-xml/gerrit-maven-maven-release-master @@ -143,6 +143,53 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. + + + + + + ANT + releng/ciman + + + ANT + **/master + + + false + + + + false + false + false + false + + false + false + true + false + false + + + False + + false + + + build release$ + + + + + + + + + + test-server + + mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes diff --git a/.jjb-test/expected-xml/github-maven-maven-release-master b/.jjb-test/expected-xml/github-maven-maven-release-master index 73aba06d..d41076e5 100644 --- a/.jjb-test/expected-xml/github-maven-maven-release-master +++ b/.jjb-test/expected-xml/github-maven-maven-release-master @@ -138,6 +138,26 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. + + + + + false + + + + ^build release$ + true + true + true + false + + + Maven Release + + + + mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index b5038877..1a689b34 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -181,8 +181,9 @@ # staging-profile-id: Profile ID of the project's Nexus staging profile. # # Optional parameters: - # mvn-global-settings: The name of the Maven global settings to use for - # Maven configuration. (default: global-settings) + # :gerrit_verify_triggers: Override Gerrit Triggers. + # :mvn-global-settings: The name of the Maven global settings to use for + # Maven configuration. (default: global-settings) ###################### # Default parameters # @@ -200,6 +201,10 @@ stream: master submodule-recursive: true + gerrit_release_triggers: + - comment-added-contains-event: + comment-contains-value: build release$ + ##################### # Job Configuration # ##################### @@ -237,6 +242,17 @@ submodule-recursive: '{submodule-recursive}' choosing-strategy: default + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_release_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + - job-template: name: '{project-name}-maven-release-{stream}' id: github-maven-release @@ -257,6 +273,19 @@ choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' + triggers: + - lf-infra-github-pr-trigger: + trigger-phrase: '^build release$' + only-trigger-phrase: true + status-context: 'Maven Release' + permit-all: true + github-hooks: true + github-org: '' + github_pr_whitelist: + - '' + github_pr_admin_list: + - '' + ############### # Maven Sonar # ###############