X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=c89ba5b1f925523c43fcd09487e9ac1046b8a83e;hb=f4e0e413849367f8f71bc4cb9098e282c0ac206e;hp=cd3172b16507cc0e0e430efb44f4d99b49e834e1;hpb=757650c835599c0aa4fe62ed99f05eab324c6f37;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index cd3172b1..c89ba5b1 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -1,53 +1,6 @@ --- # This file contains job templates for Maven projects. -- job-group: - name: '{project-name}-maven-jobs' - - # This job group contains all the recommended jobs that should be deployed - # for any project ci. - - # TODO: Add Maven Merge job to this list once it's been fully tested. - jobs: - - gerrit-maven-clm - - gerrit-maven-merge - - gerrit-maven-release - - gerrit-maven-verify - - gerrit-maven-verify-dependencies - -- job-group: - name: '{project-name}-github-maven-jobs' - - # This job group contains all the recommended jobs that should be deployed - # for any project ci that is using github. - - # TODO: Add Maven Merge job to this list once it's been fully tested. - jobs: - - github-maven-clm - - github-maven-merge - - github-maven-release - - github-maven-verify - -- job-group: - name: '{project-name}-maven-javadoc-jobs' - - # This job group contains all the recommended jobs that should be deployed - # for any project ci. - - jobs: - - gerrit-maven-javadoc-publish - - gerrit-maven-javadoc-verify - -- job-group: - name: '{project-name}-github-maven-javadoc-jobs' - - # This job group contains all the recommended jobs that should be deployed - # for any project ci. - - jobs: - - github-maven-javadoc-publish - - github-maven-javadoc-verify - ########## # Macros # ########## @@ -80,7 +33,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' @@ -124,8 +81,6 @@ mvn-opts: '{mvn-opts}' mvn-params: '{mvn-params}' mvn-version: '{mvn-version}' - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '{staging-profile-id}' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' @@ -157,41 +112,51 @@ branch: master build-days-to-keep: 30 # 30 days for troubleshooting purposes build-timeout: 60 + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 - staging-profile-id: '' # Unused in this job + mvn-version: mvn35 + nexus-iq-stage: 'build' stream: master submodule-recursive: true + nexus_iq_scan_patterns: + - '**/*.ear' + - '**/*.jar' + - '**/*.tar.gz' + - '**/*.war' + - '**/*.zip' + gerrit_clm_triggers: - comment-added-contains-event: comment-contains-value: run-clm$ + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + - lf-infra-maven-parameters: + mvn-opts: '{mvn-opts}' + mvn-params: '{mvn-params}' + mvn-version: '{mvn-version}' + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + - lf-clm-parameters: + nexus-iq-stage: '{nexus-iq-stage}' + ##################### # 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 + disabled: '{disable-job}' builders: - lf-maven-install: @@ -206,8 +171,12 @@ - ../shell/sonatype-clm.sh - lf-provide-maven-settings-cleanup - shell: 'find . -regex ".*karaf/target" | xargs rm -rf' - - sonatype-clm: - application-name: '{project-name}' + - nexus-iq-policy-evaluator: + stage: '{nexus-iq-stage}' + application-type: 'manual' + application-id: '{project-name}' + scan-patterns: '{obj:nexus_iq_scan_patterns}' + fail-build-network-error: true - job-template: name: '{project-name}-maven-clm-{stream}' @@ -225,6 +194,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 @@ -233,8 +220,10 @@ <<: *lf_maven_clm properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -246,17 +235,20 @@ 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 + only-trigger-phrase: true 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}' + white-list-target-branches: + - '{branch}' ######################### # Maven Javadoc Publish # @@ -272,13 +264,14 @@ branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 60 + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 - staging-profile-id: '' # Unused by the javadoc jobs + mvn-version: mvn35 stream: master submodule-recursive: true @@ -291,6 +284,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -347,8 +342,10 @@ <<: *lf_maven_javadoc_publish properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -363,15 +360,18 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true - status-context: 'JJB Merge' - permit-all: false + status-context: 'Maven Javadoc Publish' + permit-all: true 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}' + white-list-target-branches: + - '{branch}' ######################## # Maven Javadoc Verify # @@ -387,13 +387,14 @@ branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 60 + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' - mvn-version: mvn33 - staging-profile-id: '' # Unused by the javadoc jobs + mvn-version: mvn35 stream: master submodule-recursive: true @@ -404,13 +405,14 @@ 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 # ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-maven-install: @@ -460,8 +462,10 @@ <<: *lf_maven_javadoc_verify properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -473,17 +477,14 @@ 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: - - '' + white-list-target-branches: + - '{branch}' ############### # Maven Merge # @@ -499,16 +500,17 @@ branch: master build-days-to-keep: 30 # 30 days in case we need to troubleshoot build-timeout: 60 - cron: 'H H * * 0' # push fresh snapshot weekly + cron: '@daily' + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' 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 submodule-recursive: true @@ -518,8 +520,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: '' @@ -527,6 +533,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -593,8 +601,10 @@ <<: *lf_maven_merge properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -606,24 +616,30 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - timed: '{obj:cron}' + - github + - pollscm: + cron: '' + - github-pull-request: trigger-phrase: '^remerge$' - only-trigger-phrase: false + only-trigger-phrase: true status-context: 'Maven Merge' 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}' + white-list-target-branches: + - '{branch}' + included-regions: '{obj:github_included_regions}' -################# -# Maven Release # -################# +############### +# Maven Stage # +############### -- lf_maven_release: &lf_maven_release - name: lf-maven-release +- lf_maven_stage: &lf_maven_stage + name: lf-maven-stage ###################### # Default parameters # @@ -632,25 +648,49 @@ branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 60 - cron: '' + cron: '@daily' + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' 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 gerrit_release_triggers: - comment-added-contains-event: - comment-contains-value: build release$ + comment-contains-value: stage-release$ ##################### # Job Configuration # ##################### + disabled: '{disable-job}' + + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + - lf-infra-maven-parameters: + mvn-opts: '{mvn-opts}' + mvn-params: '{mvn-params}' + mvn-version: '{mvn-version}' + staging-profile-id: '{staging-profile-id}' + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + - string: + name: STAGING_PROFILE_ID + default: '{staging-profile-id}' + description: Nexus staging profile ID. + builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -671,11 +711,11 @@ - lf-provide-maven-settings-cleanup - job-template: - name: '{project-name}-maven-release-{stream}' - id: gerrit-maven-release + name: '{project-name}-maven-stage-{stream}' + id: gerrit-maven-stage <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_release + <<: *lf_maven_stage scm: - lf-infra-gerrit-scm: @@ -699,15 +739,17 @@ branch-pattern: '**/{branch}' - job-template: - name: '{project-name}-maven-release-{stream}' - id: github-maven-release + name: '{project-name}-maven-stage-{stream}' + id: github-maven-stage <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_release + <<: *lf_maven_stage properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -720,17 +762,14 @@ 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: - - '' + white-list-target-branches: + - '{branch}' ############### # Maven Sonar # @@ -747,14 +786,15 @@ build-days-to-keep: 7 build-timeout: 60 cron: 'H H * * 6' # run weekly + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 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 submodule-recursive: true @@ -766,6 +806,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + parameters: - lf-infra-parameters: project: '{project}' @@ -776,8 +818,6 @@ mvn-opts: '{mvn-opts}' mvn-params: '{mvn-params}' mvn-version: '{mvn-version}' - # Staging repos do not make sense for Sonar jobs so set it blank. - staging-profile-id: '' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' @@ -861,8 +901,10 @@ <<: *lf_maven_sonar properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -874,17 +916,14 @@ 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: - - '' + white-list-target-branches: + - '{branch}' ################ # Maven Verify # @@ -900,14 +939,15 @@ branch: master build-days-to-keep: 7 build-timeout: 60 + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 mvn-global-settings: global-settings mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' - mvn-version: mvn33 - staging-profile-id: '' # Unused in this job + mvn-version: mvn35 stream: master submodule-recursive: true @@ -918,16 +958,22 @@ 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 # ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-jacoco-nojava-workaround @@ -985,8 +1031,10 @@ <<: *lf_maven_verify properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' - github: - url: '{git-url}/{github-org}/{project}' + url: '{github-url}/{github-org}/{project}' scm: - lf-infra-github-scm: @@ -998,17 +1046,15 @@ 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: - - '' + white-list-target-branches: + - '{branch}' + included-regions: '{obj:github_included_regions}' ############################# # Maven Verify Dependencies # @@ -1024,14 +1070,15 @@ branch: master build-days-to-keep: 7 build-timeout: 60 + disable-job: false git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' java-version: openjdk8 mvn-global-settings: global-settings mvn-goals: clean deploy mvn-opts: '' mvn-params: '-Dstream=$STREAM' - mvn-version: mvn33 - staging-profile-id: '' # Unused by this job + mvn-version: mvn35 stream: master submodule-recursive: true @@ -1047,6 +1094,7 @@ ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-jacoco-nojava-workaround