X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=361c6c2301160d555c04ca125695b118b7501469;hb=1945ffb09e4857fbe7e6b14310dbbcf84a50a361;hp=452b839cd1ccd9e6d5105018c71a781016eb24a1;hpb=8f6f9fe4beef3c73cd124d2177423d7ef996224c;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 452b839c..361c6c23 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -11,6 +11,7 @@ - gerrit-maven-clm - gerrit-maven-release - gerrit-maven-verify + - gerrit-maven-verify-dependencies - job-group: name: '{project-name}-github-maven-jobs' @@ -90,19 +91,6 @@ - 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 # ###################### @@ -116,12 +104,10 @@ 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 # ##################### @@ -187,38 +173,6 @@ - lf_maven_javadoc_publish: &lf_maven_javadoc_publish name: lf-maven-javadoc-publish - # Produces and publishes javadocs for a Maven project. - # - # Expects javadocs to be available in $WORKSPACE/target/site/apidocs - # - # Required parameters: - # - # :build-node: The node to run build on. - # :javadoc-path: The path in Nexus to deploy javadoc to. - # :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. - # :mvn-site-id: Maven Server ID from settings.xml to pull credentials from. - # (Note: This setting should be configured in defaults.yaml.) - # - # Optional parameters: - # - # :branch: The branch to build against. (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) - # :submodule-recursive: Whether to checkout submodules recursively. - # (default: true) - # - # :gerrit_javadoc_merge_triggers: Override Gerrit Triggers. - ###################### # Default parameters # ###################### @@ -232,10 +186,11 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true - gerrit_javadoc_merge_triggers: + gerrit_merge_triggers: - change-merged-event - comment-added-contains-event: comment-contains-value: remerge$ @@ -282,7 +237,7 @@ triggers: - gerrit: server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_javadoc_merge_triggers}' + trigger-on: '{obj:gerrit_merge_triggers}' projects: - project-compare-type: ANT project-pattern: '{project}' @@ -331,35 +286,6 @@ - lf_maven_javadoc_verify: &lf_maven_javadoc_verify name: lf-maven-javadoc-verify - # Produces javadocs for a Maven project. - # - # Expects javadocs to be available in $WORKSPACE/target/site/apidocs - # - # 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: The branch to build against. (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) - # :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM) - # :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_javadoc_verify_triggers: Override Gerrit Triggers. - ###################### # Default parameters # ###################### @@ -373,12 +299,13 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true - gerrit_javadoc_verify_triggers: + gerrit_verify_triggers: - patchset-created-event: - exclude-drafts: false + exclude-drafts: true exclude-trivial-rebase: false exclude-no-code-change: false - draft-published-event @@ -389,6 +316,8 @@ # Job Configuration # ##################### + concurrent: true + builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -419,7 +348,7 @@ triggers: - gerrit: server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_javadoc_verify_triggers}' + trigger-on: '{obj:gerrit_verify_triggers}' projects: - project-compare-type: ANT project-pattern: '{project}' @@ -467,26 +396,6 @@ - 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. - # :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from. - # (Note: This setting should be configured in defaults.yaml.) - # :staging-profile-id: Profile ID of the project's Nexus staging profile. - # - # Optional parameters: - # :gerrit_verify_triggers: Override Gerrit Triggers. - # :mvn-global-settings: The name of the Maven global settings to use for - # Maven configuration. (default: global-settings) - ###################### # Default parameters # ###################### @@ -494,6 +403,7 @@ 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 @@ -545,6 +455,7 @@ choosing-strategy: default triggers: + - timed: '{obj:cron}' - gerrit: server-name: '{gerrit-server-name}' trigger-on: '{obj:gerrit_release_triggers}' @@ -576,6 +487,7 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: + - timed: '{obj:cron}' - lf-infra-github-pr-trigger: trigger-phrase: '^build release$' only-trigger-phrase: true @@ -595,36 +507,6 @@ - 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 # ###################### @@ -638,6 +520,7 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -645,9 +528,6 @@ - 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 # ##################### @@ -754,37 +634,6 @@ - lf_maven_verify: &lf_maven_verify name: lf-maven-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. - ###################### # Default parameters # ###################### @@ -798,12 +647,13 @@ 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: false + exclude-drafts: true exclude-trivial-rebase: false exclude-no-code-change: false - draft-published-event @@ -897,3 +747,89 @@ - '' github_pr_admin_list: - '' + +############################# +# Maven Verify Dependencies # +############################# + +- lf_maven_verify_dependencies: &lf_maven_verify_dependencies + name: lf-maven-verify-dependencies + + ###################### + # Default parameters # + ###################### + + 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}'