X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=c89ba5b1f925523c43fcd09487e9ac1046b8a83e;hb=f4e0e413849367f8f71bc4cb9098e282c0ac206e;hp=ca94823431e4ebb449ce5ca598ec8707acff5ede;hpb=008d7f16e3784f03c60a4e425b064447efff210f;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index ca948234..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,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: 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 # ##################### - 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: @@ -210,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}' @@ -229,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 @@ -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: @@ -250,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 # @@ -276,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 @@ -295,6 +284,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -351,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: @@ -367,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 # @@ -391,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 @@ -408,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: @@ -464,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: @@ -477,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 # @@ -503,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 @@ -512,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 @@ -522,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: '' @@ -531,6 +533,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -597,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: @@ -610,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 # @@ -636,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 @@ -649,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: @@ -675,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: @@ -703,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: @@ -724,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 # @@ -751,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 @@ -770,6 +806,8 @@ # Job Configuration # ##################### + disabled: '{disable-job}' + parameters: - lf-infra-parameters: project: '{project}' @@ -780,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}' @@ -865,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: @@ -878,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 # @@ -904,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 @@ -922,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 @@ -989,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: @@ -1002,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 # @@ -1028,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 @@ -1051,6 +1094,7 @@ ##################### concurrent: true + disabled: '{disable-job}' builders: - lf-jacoco-nojava-workaround