X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-maven-jobs.yaml;h=d29011561b8f04d389b5e899b3a75a0cd289c959;hb=refs%2Fchanges%2F36%2F8436%2F2;hp=6d7566699aacadfb136de197e3c3cea6bc5c9152;hpb=7b53496161eb257924609d83e1cb3cea47127bd2;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 6d756669..d2901156 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -10,6 +10,7 @@ # 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 @@ -23,6 +24,7 @@ # 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 @@ -46,6 +48,17 @@ - github-maven-javadoc-publish - github-maven-javadoc-verify +########## +# Macros # +########## + +- builder: + name: lf-maven-deploy + builders: + - shell: !include-raw: + - ../shell/common-variables.sh + - ../shell/maven-deploy.sh + #################### # COMMON FUNCTIONS # #################### @@ -53,6 +66,21 @@ - lf_maven_common: &lf_maven_common name: lf-maven-common + ###################### + # Default parameters # + ###################### + + archive-artifacts: > + **/*.log + **/hs_err_*.log + **/target/**/feature.xml + **/target/failsafe-reports/failsafe-summary.xml + **/target/surefire-reports/*-output.txt + + ##################### + # Job Configuration # + ##################### + project-type: freestyle node: '{build-node}' jdk: '{java-version}' @@ -101,7 +129,6 @@ # Default parameters # ###################### - archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days for troubleshooting purposes build-timeout: 30 @@ -115,6 +142,10 @@ stream: master submodule-recursive: true + gerrit_clm_triggers: + - comment-added-contains-event: + comment-contains-value: run-clm$ + ##################### # Job Configuration # ##################### @@ -122,6 +153,20 @@ 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 builders: - lf-maven-install: @@ -173,6 +218,19 @@ choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' + triggers: + - lf-infra-github-pr-trigger: + trigger-phrase: '^run-clm$' + only-trigger-phrase: false + status-context: 'CLM' + permit-all: true + github-hooks: true + github-org: '' + github_pr_whitelist: + - '' + github_pr_admin_list: + - '' + ######################### # Maven Javadoc Publish # ######################### @@ -184,7 +242,6 @@ # 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 @@ -298,7 +355,6 @@ # 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 @@ -409,7 +465,6 @@ # Default parameters # ###################### - archive-artifacts: '' branch: master build-days-to-keep: 30 # 30 days in case we need to troubleshoot build-timeout: 30 @@ -458,7 +513,7 @@ - ../shell/common-variables.sh - ../shell/maven-fetch-metadata.sh - ../shell/maven-build.sh - - ../shell/maven-deploy.sh + - lf-maven-deploy - lf-provide-maven-settings-cleanup publishers: @@ -540,7 +595,6 @@ # 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 @@ -652,7 +706,6 @@ # Default parameters # ###################### - archive-artifacts: '' branch: master # Sonar should always be run on master branch build-days-to-keep: 7 build-timeout: 30 @@ -662,6 +715,7 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn33 + sonar-mvn-goal: 'sonar:sonar' staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -674,6 +728,30 @@ # 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: @@ -709,9 +787,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}' @@ -780,7 +856,6 @@ # Default parameters # ###################### - archive-artifacts: '' branch: master build-days-to-keep: 7 build-timeout: 60 @@ -902,7 +977,6 @@ # Default parameters # ###################### - archive-artifacts: '' branch: master build-days-to-keep: 7 build-timeout: 60