X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=c89ba5b1f925523c43fcd09487e9ac1046b8a83e;hb=f4e0e413849367f8f71bc4cb9098e282c0ac206e;hp=b1872a15ba5b8f9b05b77e5ae37f02fb17259bf7;hpb=1446ca9ed6f9eab0f36a5a45f4b62a377341b7f5;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index b1872a15..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 # ########## @@ -128,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}' @@ -161,24 +112,52 @@ 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: mvn35 - staging-profile-id: '' # Unused in this job + 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 # ##################### + disabled: '{disable-job}' + builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -192,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}' @@ -237,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: @@ -254,7 +239,7 @@ - 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 @@ -262,6 +247,8 @@ - '{github-org}' white-list: '{obj:github_pr_whitelist}' admin-list: '{obj:github_pr_admin_list}' + white-list-target-branches: + - '{branch}' ######################### # Maven Javadoc Publish # @@ -277,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: mvn35 - staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -296,6 +284,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -352,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: @@ -372,12 +364,14 @@ trigger-phrase: '^remerge$' only-trigger-phrase: true status-context: 'Maven Javadoc Publish' - permit-all: false + permit-all: true github-hooks: true 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 # @@ -393,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: mvn35 - staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -410,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: @@ -466,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: @@ -480,11 +478,13 @@ triggers: - github-pull-request: - trigger-phrase: '^recheck$' + trigger-phrase: ^(recheck|reverify)$ only-trigger-phrase: false status-context: 'Maven Javadoc Verify' permit-all: true github-hooks: true + white-list-target-branches: + - '{branch}' ############### # Maven Merge # @@ -500,8 +500,10 @@ 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 @@ -509,7 +511,6 @@ mvn-params: '-Dmerge' 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 @@ -532,6 +533,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -598,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: @@ -611,6 +616,7 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: + - timed: '{obj:cron}' - github - pollscm: cron: '' @@ -618,20 +624,22 @@ trigger-phrase: '^remerge$' only-trigger-phrase: true status-context: 'Maven Merge' - permit-all: false + permit-all: true github-hooks: true 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 # @@ -640,8 +648,10 @@ 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 @@ -653,12 +663,34 @@ 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: @@ -679,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: @@ -707,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: @@ -734,6 +768,8 @@ status-context: 'Maven Release' permit-all: true github-hooks: true + white-list-target-branches: + - '{branch}' ############### # Maven Sonar # @@ -750,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: mvn35 sonar-mvn-goal: 'sonar:sonar' - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -769,6 +806,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + parameters: - lf-infra-parameters: project: '{project}' @@ -779,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}' @@ -864,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: @@ -883,6 +922,8 @@ status-context: 'Maven Sonar' permit-all: true github-hooks: true + white-list-target-branches: + - '{branch}' ################ # Maven Verify # @@ -898,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: mvn35 - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -916,7 +958,8 @@ 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: '.*' @@ -930,6 +973,7 @@ ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-jacoco-nojava-workaround @@ -987,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: @@ -1001,11 +1047,13 @@ triggers: - github-pull-request: - trigger-phrase: '^recheck$' + trigger-phrase: '^(recheck|reverify)$' only-trigger-phrase: false status-context: 'Maven Verify' permit-all: true github-hooks: true + white-list-target-branches: + - '{branch}' included-regions: '{obj:github_included_regions}' ############################# @@ -1022,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: mvn35 - staging-profile-id: '' # Unused by this job stream: master submodule-recursive: true @@ -1045,6 +1094,7 @@ ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-jacoco-nojava-workaround