X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=0d777553e2d1b84ca0ef8f2c941c40ff42f9b915;hb=d371fe9f60056d0f4efd988613636869c515b02d;hp=9f7173abe24d1923d3cd94067382deb172ec250d;hpb=76a760c1a39a38def2b9c5642645abf5abde83f3;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 9f7173ab..0d777553 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -52,6 +52,15 @@ # Macros # ########## +- builder: + name: lf-maven-build + builders: + - inject: + properties-content: 'MAVEN_GOALS={mvn-goals}' + - shell: !include-raw-escape: + - ../shell/common-variables.sh + - ../shell/maven-build.sh + - builder: name: lf-maven-deploy builders: @@ -62,7 +71,8 @@ - builder: name: lf-maven-stage builders: - - shell: !include-raw-escape: + # include-raw-escape fails due to JJB bug + - shell: !include-raw: - ../shell/common-variables.sh - ../shell/maven-stage.sh @@ -70,7 +80,11 @@ name: lf-update-java-alternatives builders: - inject: - properties-content: 'SET_JDK_VERSION={java-version}' + # Work around inject plugin overriding our GIT_URL variable incorrectly + # https://issues.jenkins-ci.org/browse/JENKINS-49775 + properties-content: | + SET_JDK_VERSION={java-version} + GIT_URL="$GIT_URL" - shell: !include-raw-escape: ../shell/update-java-alternatives.sh - inject: properties-file: '/tmp/java.env' @@ -152,7 +166,7 @@ mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 + mvn-version: mvn35 staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -165,24 +179,6 @@ # Job Configuration # ##################### - triggers: - # Build weekly on Saturdays - - timed: 'H H * * 6' - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_clm_triggers}' - projects: - - project-compare-type: ANT - project-pattern: '{project}' - branches: - - branch-compare-type: ANT - branch-pattern: '**/{branch}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -215,6 +211,24 @@ submodule-recursive: '{submodule-recursive}' choosing-strategy: default + triggers: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_clm_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + - job-template: name: '{project-name}-maven-clm-{stream}' id: github-maven-clm @@ -223,6 +237,8 @@ <<: *lf_maven_clm properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -236,17 +252,18 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - github-pull-request: trigger-phrase: '^run-clm$' only-trigger-phrase: false status-context: 'CLM' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' ######################### # Maven Javadoc Publish # @@ -267,7 +284,7 @@ mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 + mvn-version: mvn35 staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -337,6 +354,8 @@ <<: *lf_maven_javadoc_publish properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -353,15 +372,16 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true - status-context: 'JJB Merge' + status-context: 'Maven Javadoc Publish' permit-all: false github-hooks: true - github-org: '{github-org}' - github_pr_whitelist: '{obj:github_pr_whitelist}' - github_pr_admin_list: '{obj:github_pr_admin_list}' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' ######################## # Maven Javadoc Verify # @@ -382,7 +402,7 @@ mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 + mvn-version: mvn35 staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -394,7 +414,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 # @@ -450,6 +470,8 @@ <<: *lf_maven_javadoc_verify properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -463,17 +485,12 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: - trigger-phrase: '^recheck$' - only-trigger-phrase: true - status-context: 'Maven Javadoc' + - github-pull-request: + trigger-phrase: ^(recheck|reverify)$ + only-trigger-phrase: false + status-context: 'Maven Javadoc Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ############### # Maven Merge # @@ -493,9 +510,10 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dmerge' - mvn-version: mvn33 + mvn-version: mvn35 nexus-cut-dirs: 6 # Number of dirs in the Nexus path to remove for wget -r. staging-profile-id: '' # Unused by this job. stream: master @@ -507,8 +525,12 @@ comment-contains-value: remerge$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' post_build_trigger: '' @@ -533,9 +555,9 @@ NEXUS_REPO={nexus-snapshot-repo} - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - ../shell/maven-fetch-metadata.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-maven-deploy - lf-provide-maven-settings-cleanup @@ -582,6 +604,8 @@ <<: *lf_maven_merge properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -595,17 +619,20 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github + - pollscm: + cron: '' + - github-pull-request: trigger-phrase: '^remerge$' - only-trigger-phrase: false + only-trigger-phrase: true status-context: 'Maven Merge' - permit-all: true + permit-all: false github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + included-regions: '{obj:github_included_regions}' ################# # Maven Release # @@ -625,9 +652,10 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '' - mvn-version: mvn33 + mvn-version: mvn35 stream: master submodule-recursive: true @@ -652,9 +680,9 @@ server-id: '{mvn-staging-id}' - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - ../shell/maven-patch-release.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-maven-stage - lf-provide-maven-settings-cleanup @@ -694,6 +722,8 @@ <<: *lf_maven_release properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -708,17 +738,12 @@ triggers: - timed: '{obj:cron}' - - lf-infra-github-pr-trigger: + - github-pull-request: 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 # @@ -740,7 +765,7 @@ mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 + mvn-version: mvn35 sonar-mvn-goal: 'sonar:sonar' staging-profile-id: '' # Unused in this job stream: master @@ -849,6 +874,8 @@ <<: *lf_maven_sonar properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -862,17 +889,12 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: - trigger-phrase: '^recheck$' + - github-pull-request: + trigger-phrase: '^run-sonar$' only-trigger-phrase: false - status-context: 'Maven Verify' + status-context: 'Maven Sonar' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ################ # Maven Verify # @@ -891,9 +913,10 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' - mvn-version: mvn33 + mvn-version: mvn35 staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -905,10 +928,15 @@ 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: ANT - pattern: '**' + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' ##################### # Job Configuration # @@ -927,8 +955,8 @@ settings-file: '{mvn-settings}' - shell: !include-raw-escape: - ../shell/lftools-install.sh - - ../shell/common-variables.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-provide-maven-settings-cleanup publishers: @@ -972,6 +1000,8 @@ <<: *lf_maven_verify properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: url: '{git-url}/{github-org}/{project}' @@ -985,17 +1015,13 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: - trigger-phrase: '^recheck$' + - github-pull-request: + trigger-phrase: '^(recheck|reverify)$' only-trigger-phrase: false status-context: 'Maven Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' ############################# # Maven Verify Dependencies # @@ -1014,9 +1040,10 @@ git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings + mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' - mvn-version: mvn33 + mvn-version: mvn35 staging-profile-id: '' # Unused by this job stream: master submodule-recursive: true @@ -1047,9 +1074,8 @@ - shell: !include-raw-escape: - ../shell/common-variables.sh - ../shell/maven-build-deps.sh - - shell: !include-raw-escape: - - ../shell/common-variables.sh - - ../shell/maven-build.sh + - lf-maven-build: + mvn-goals: '{mvn-goals}' - lf-provide-maven-settings-cleanup publishers: