X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=8d4d837bdebe74eac2d320e4f4a59d99ed9861e5;hb=5e403dec080850163f75cf80e0317fcf839d69aa;hp=73f567ec2c76d37ccf76670f8893acf5170b5b70;hpb=7f77f1fb4e685f631912c25955bfd54d5b06c22c;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 73f567ec..8d4d837b 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -7,10 +7,12 @@ # 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-release - gerrit-maven-verify + - gerrit-maven-verify-dependencies - job-group: name: '{project-name}-github-maven-jobs' @@ -18,11 +20,32 @@ # 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-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 + #################### # COMMON FUNCTIONS # #################### @@ -50,6 +73,10 @@ 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}' + description: Artifacts to archive to the logs server. wrappers: - lf-infra-wrappers: @@ -70,38 +97,24 @@ - lf_maven_clm: &lf_maven_clm name: lf-maven-clm - # Produces a CLM scan of the code into Nexus IQ Server. - # - # Required parameters: - # build-node: The node to run build on. - # jenkins-ssh-credential: Credential to use for SSH. (Generally should - # be configured in defaults.yaml) - # mvn-settings: The name of settings file containing credentials for - # the project. - # - # Optional parameters: - # mvn-global-settings: The name of the Maven global settings to use for - # Maven configuration. (default: global-settings) - ###################### # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days for troubleshooting purposes - build-timeout: 15 + build-timeout: 30 git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '' - ##################### # Job Configuration # ##################### @@ -154,40 +167,24 @@ scm: - lf-infra-github-scm: url: '{git-clone-url}{github-org}/{project}' - refspec: '+refs/pull/*:refs/remotes/origin/pr/*' - branch: '{branch}' + refspec: '' + branch: 'refs/heads/{branch}' submodule-recursive: '{submodule-recursive}' choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' -################# -# Maven Release # -################# +######################### +# Maven Javadoc Publish # +######################### -- lf_maven_release: &lf_maven_release - name: lf-maven-release - - # Produces a release candidate by creating a staging repo in Nexus. - # - # Runs a Maven build and deploys to $WORKSPACE/m2repo directory. This - # directory can then be reused later to deploy to Nexus. - # - # Required parameters: - # build-node: The node to run build on. - # jenkins-ssh-credential: Credential to use for SSH. (Generally should - # be configured in defaults.yaml) - # mvn-settings: The name of settings file containing credentials for - # the project. - # 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) +- lf_maven_javadoc_publish: &lf_maven_javadoc_publish + name: lf-maven-javadoc-publish ###################### # Default parameters # ###################### + archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days in case a release takes long to get approved. build-timeout: 30 @@ -197,52 +194,71 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true + gerrit_merge_triggers: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + ##################### # Job Configuration # ##################### builders: - - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' - lf-infra-create-netrc: - server-id: opendaylight-staging + server-id: '{mvn-site-id}' + - inject: + properties-content: 'DEPLOY_PATH={javadoc-path}' - shell: !include-raw-escape: - - ../shell/lftools-install.sh - ../shell/common-variables.sh - - ../shell/maven-patch-release.sh - - ../shell/maven-build.sh - - ../shell/maven-stage.sh + - ../shell/maven-javadoc-generate.sh + - ../shell/lftools-install.sh + - ../shell/maven-javadoc-publish.sh - lf-provide-maven-settings-cleanup - job-template: - name: '{project-name}-maven-release-{stream}' - id: gerrit-maven-release + name: '{project-name}-maven-javadoc-publish-{stream}' + id: gerrit-maven-javadoc-publish <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_release + <<: *lf_maven_javadoc_publish + + git-url: '$GIT_URL/$GERRIT_PROJECT' scm: - lf-infra-gerrit-scm: - jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}' - refspec: '$GERRIT_REFSPEC' - branch: '$GERRIT_BRANCH' + refspec: '' + branch: '{branch}' submodule-recursive: '{submodule-recursive}' choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_merge_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 + name: '{project-name}-maven-javadoc-publish-{stream}' + id: github-maven-javadoc-publish <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_release + <<: *lf_maven_javadoc_publish properties: - github: @@ -251,84 +267,179 @@ scm: - lf-infra-github-scm: url: '{git-clone-url}{github-org}/{project}' - refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + refspec: '' branch: '{branch}' submodule-recursive: '{submodule-recursive}' choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' -################ -# Maven Verify # -################ + triggers: + - github + - pollscm: + cron: '' + - lf-infra-github-pr-trigger: + trigger-phrase: '^remerge$' + only-trigger-phrase: true + status-context: 'JJB Merge' + 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}' -- lf_maven_verify: &lf_maven_verify - name: lf-maven-verify +######################## +# Maven Javadoc Verify # +######################## - # Verify job which runs mvn clean install to test a project build.. - # - # Required parameters: - # - # :build-node: The node to run build on. - # :jenkins-ssh-credential: Credential to use for SSH. (Generally should - # be configured in defaults.yaml) - # :mvn-settings: The name of settings file containing credentials for - # the project. - # - # Optional parameters: - # - # :branch: Git branch to fetch for the build. (default: master) - # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) - # :build-timeout: Timeout in seconds before aborting build. (default: 60) - # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) - # :java-version: Version of Java to use for the build. (default: openjdk8) - # :mvn-global-settings: The name of the Maven global settings to use for - # Maven configuration. (default: global-settings) - # :mvn-opts: Sets MAVEN_OPTS. (default: '') - # :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - # :mvn-version: Version of maven to use. (default: mvn33) - # :stream: Keyword that can be used to represent a release code-name. - # Often the same as the branch. (default: master) - # :submodule-recursive: Whether to checkout submodules recursively. - # (default: true) - # - # :gerrit_verify_triggers: Override Gerrit Triggers. - # :gerrit_trigger_file_paths: Override file paths which can be used to - # filter which file modifications will trigger a build. +- lf_maven_javadoc_verify: &lf_maven_javadoc_verify + name: lf-maven-javadoc-verify ###################### # Default parameters # ###################### + archive-artifacts: '' branch: master - build-days-to-keep: 7 - build-timeout: 60 + build-days-to-keep: 30 # 30 days in case a release takes long to get approved. + build-timeout: 30 git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' - mvn-params: '-Dstream=$STREAM' + mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true gerrit_verify_triggers: - patchset-created-event: - exclude-drafts: false + exclude-drafts: true exclude-trivial-rebase: false exclude-no-code-change: false - draft-published-event - comment-added-contains-event: comment-contains-value: recheck$ + + ##################### + # Job Configuration # + ##################### + + concurrent: true + + builders: + - lf-maven-install: + mvn-version: '{mvn-version}' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' + - shell: !include-raw-escape: + - ../shell/common-variables.sh + - ../shell/maven-javadoc-generate.sh + - lf-provide-maven-settings-cleanup + +- job-template: + name: '{project-name}-maven-javadoc-verify-{stream}' + id: gerrit-maven-javadoc-verify + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_javadoc_verify + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: gerrit + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_verify_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + +- job-template: + name: '{project-name}-maven-javadoc-verify-{stream}' + id: github-maven-javadoc-verify + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_javadoc_verify + + properties: + - github: + url: '{git-url}/{github-org}/{project}' + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + triggers: + - lf-infra-github-pr-trigger: + trigger-phrase: '^recheck$' + only-trigger-phrase: true + status-context: 'Maven Javadoc' + permit-all: true + github-hooks: true + github-org: '' + github_pr_whitelist: + - '' + github_pr_admin_list: + - '' + +############### +# Maven Merge # +############### + +- lf_maven_merge: &lf_maven_merge + name: lf-maven-merge + + ###################### + # Default parameters # + ###################### + + archive-artifacts: '' + branch: master + build-days-to-keep: 30 # 30 days in case we need to troubleshoot + build-timeout: 30 + cron: '' + git-url: '$GIT_URL/$PROJECT' + java-version: openjdk8 + mvn-global-settings: global-settings + mvn-opts: '' + mvn-params: '-Dmerge' + mvn-version: mvn33 + 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 + + gerrit_merge_triggers: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + gerrit_trigger_file_paths: - compare-type: ANT pattern: '**' + post_build_trigger: '' + ##################### # Job Configuration # ##################### - concurrent: true - builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -336,23 +447,32 @@ - lf-provide-maven-settings: global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' + - lf-infra-create-netrc: + server-id: '{mvn-snapshot-id}' + - inject: + properties-content: | + NEXUS_CUT_DIRS={nexus-cut-dirs} + 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 + - ../shell/maven-deploy.sh - lf-provide-maven-settings-cleanup publishers: - findbugs - lf-jacoco-report - lf-infra-publish + - trigger-parameterized-builds: '{obj:post_build_trigger}' - job-template: - name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' - id: gerrit-maven-verify + name: '{project-name}-maven-merge-{stream}' + id: gerrit-maven-merge <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_verify + <<: *lf_maven_merge scm: - lf-infra-gerrit-scm: @@ -361,12 +481,13 @@ refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' - choosing-strategy: gerrit + choosing-strategy: default triggers: + - timed: 'H H * * 0' - gerrit: server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_verify_triggers}' + trigger-on: '{obj:gerrit_merge_triggers}' projects: - project-compare-type: ANT project-pattern: '{project}' @@ -376,11 +497,11 @@ file-paths: '{obj:gerrit_trigger_file_paths}' - job-template: - name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' - id: github-maven-verify + name: '{project-name}-maven-merge-{stream}' + id: github-maven-merge <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_verify + <<: *lf_maven_merge properties: - github: @@ -397,9 +518,121 @@ triggers: - lf-infra-github-pr-trigger: - trigger-phrase: '^recheck$' + trigger-phrase: '^remerge$' only-trigger-phrase: false - status-context: 'Maven Verify' + status-context: 'Maven Merge' + permit-all: true + github-hooks: true + github-org: '' + github_pr_whitelist: + - '' + github_pr_admin_list: + - '' + +################# +# Maven Release # +################# + +- lf_maven_release: &lf_maven_release + name: lf-maven-release + + ###################### + # Default parameters # + ###################### + + archive-artifacts: '' + branch: master + build-days-to-keep: 30 # 30 days in case a release takes long to get approved. + build-timeout: 30 + cron: '' + git-url: '$GIT_URL/$PROJECT' + java-version: openjdk8 + mvn-global-settings: global-settings + mvn-opts: '' + mvn-params: '' + mvn-version: mvn33 + stream: master + submodule-recursive: true + + gerrit_release_triggers: + - comment-added-contains-event: + comment-contains-value: build release$ + + ##################### + # Job Configuration # + ##################### + + builders: + - lf-jacoco-nojava-workaround + - lf-maven-install: + mvn-version: '{mvn-version}' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' + - lf-infra-create-netrc: + 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 + - ../shell/maven-stage.sh + - lf-provide-maven-settings-cleanup + +- job-template: + name: '{project-name}-maven-release-{stream}' + id: gerrit-maven-release + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_release + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + + triggers: + - timed: '{obj:cron}' + - 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 + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_release + + properties: + - github: + url: '{git-url}/{github-org}/{project}' + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '{branch}' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + triggers: + - timed: '{obj:cron}' + - 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: '' @@ -415,40 +648,11 @@ - lf_maven_sonar: &lf_maven_sonar name: lf-maven-sonar - # Sonar job which runs mvn clean install then publishes to Sonar. - # - # This job purposely only runs on the master branch as there are Additional - # configuration needed to support multiple branches and there's not much - # interest in that kind of support. - # - # Required parameters: - # - # :build-node: The node to run build on. - # :jenkins-ssh-credential: Credential to use for SSH. (Generally should - # be configured in defaults.yaml) - # :mvn-settings: The name of settings file containing credentials for - # the project. - # - # Optional parameters: - # - # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) - # :build-timeout: Timeout in seconds before aborting build. (default: 60) - # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) - # :java-version: Version of Java to use for the build. (default: openjdk8) - # :mvn-global-settings: The name of the Maven global settings to use for - # Maven configuration. (default: global-settings) - # :mvn-opts: Sets MAVEN_OPTS. (default: '') - # :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - # :mvn-version: Version of maven to use. (default: mvn33) - # :submodule-recursive: Whether to checkout submodules recursively. - # (default: true) - # - # :gerrit_sonar_triggers: Override Gerrit Triggers. - ###################### # Default parameters # ###################### + archive-artifacts: '' branch: master # Sonar should always be run on master branch build-days-to-keep: 7 build-timeout: 30 @@ -458,6 +662,8 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + sonar-mvn-goal: 'sonar:sonar' + staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -465,13 +671,34 @@ - comment-added-contains-event: comment-contains-value: run-sonar$ - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '' - ##################### # Job Configuration # ##################### + 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 repos do not make sense for Sonar jobs so set it blank. + staging-profile-id: '' + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + - string: + name: SONAR_MAVEN_GOAL + default: '{sonar-mvn-goal}' + description: | + Maven goals to pass to the Sonar call. Typically sonar:sonar + however to use a specific version of the sonar-maven-plugin we + can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar". + triggers: - timed: 'H H * * 6' - gerrit: @@ -507,9 +734,7 @@ mvn-version: '{mvn-version}' - inject: # Switch this to the sonar wrapper when JJB 2.0 is available - properties-content: | - SONAR_HOST_URL=$SONAR_URL - SONAR_MAVEN_GOAL=sonar:sonar + properties-content: SONAR_HOST_URL=$SONAR_URL - lf-provide-maven-settings: global-settings-file: global-settings settings-file: '{mvn-settings}' @@ -549,7 +774,129 @@ - lf-infra-github-scm: url: '{git-clone-url}{github-org}/{project}' refspec: '+refs/pull/*:refs/remotes/origin/pr/*' - branch: '{branch}' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + triggers: + - lf-infra-github-pr-trigger: + trigger-phrase: '^recheck$' + only-trigger-phrase: false + status-context: 'Maven Verify' + permit-all: true + github-hooks: true + github-org: '' + github_pr_whitelist: + - '' + github_pr_admin_list: + - '' + +################ +# Maven Verify # +################ + +- lf_maven_verify: &lf_maven_verify + name: lf-maven-verify + + ###################### + # Default parameters # + ###################### + + archive-artifacts: '' + branch: master + build-days-to-keep: 7 + build-timeout: 60 + git-url: '$GIT_URL/$PROJECT' + java-version: openjdk8 + mvn-global-settings: global-settings + mvn-opts: '' + mvn-params: '-Dstream=$STREAM' + mvn-version: mvn33 + staging-profile-id: '' # Unused in this job + stream: master + submodule-recursive: true + + gerrit_verify_triggers: + - patchset-created-event: + exclude-drafts: true + exclude-trivial-rebase: false + exclude-no-code-change: false + - draft-published-event + - comment-added-contains-event: + comment-contains-value: recheck$ + gerrit_trigger_file_paths: + - compare-type: ANT + pattern: '**' + + ##################### + # Job Configuration # + ##################### + + concurrent: true + + builders: + - lf-jacoco-nojava-workaround + - lf-maven-install: + mvn-version: '{mvn-version}' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' + - shell: !include-raw-escape: + - ../shell/lftools-install.sh + - ../shell/common-variables.sh + - ../shell/maven-build.sh + - lf-provide-maven-settings-cleanup + + publishers: + - findbugs + - lf-jacoco-report + - lf-infra-publish + +- job-template: + name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' + id: gerrit-maven-verify + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_verify + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: gerrit + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_verify_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + file-paths: '{obj:gerrit_trigger_file_paths}' + +- job-template: + name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' + id: github-maven-verify + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_verify + + properties: + - github: + url: '{git-url}/{github-org}/{project}' + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' submodule-recursive: '{submodule-recursive}' choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -566,3 +913,90 @@ - '' github_pr_admin_list: - '' + +############################# +# Maven Verify Dependencies # +############################# + +- lf_maven_verify_dependencies: &lf_maven_verify_dependencies + name: lf-maven-verify-dependencies + + ###################### + # Default parameters # + ###################### + + archive-artifacts: '' + branch: master + build-days-to-keep: 7 + build-timeout: 60 + git-url: '$GIT_URL/$PROJECT' + java-version: openjdk8 + mvn-global-settings: global-settings + mvn-opts: '' + mvn-params: '-Dstream=$STREAM' + mvn-version: mvn33 + staging-profile-id: '' # Unused by this job + stream: master + submodule-recursive: true + + gerrit_verify_triggers: + - comment-added-contains-event: + comment-contains-value: 'recheck: [0-9 ]+' + gerrit_trigger_file_paths: + - compare-type: ANT + pattern: '**' + + ##################### + # Job Configuration # + ##################### + + concurrent: true + + builders: + - lf-jacoco-nojava-workaround + - lf-maven-install: + mvn-version: '{mvn-version}' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' + - lf-fetch-dependent-patches + - 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-provide-maven-settings-cleanup + + publishers: + - findbugs + - lf-jacoco-report + - lf-infra-publish + +- job-template: + name: '{project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}' + id: gerrit-maven-verify-dependencies + <<: *lf_maven_common + # yamllint disable-line rule:key-duplicates + <<: *lf_maven_verify_dependencies + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: gerrit + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_verify_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + file-paths: '{obj:gerrit_trigger_file_paths}'