From: Andrew Grimberg Date: Wed, 3 Jan 2018 16:22:37 +0000 (+0000) Subject: Merge "Allow SONAR_MAVEN_GOAL to be configurable" X-Git-Tag: v0.14.0~8 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=c238d5307c09b13e356bdb83379f4060f933b3a4;hp=1ca3e3af6f48583fb29513eb9494f60b43f947f1;p=releng%2Fglobal-jjb.git Merge "Allow SONAR_MAVEN_GOAL to be configurable" --- diff --git a/.jjb-test/expected-xml/gerrit-maven-sonar b/.jjb-test/expected-xml/gerrit-maven-sonar index e48e5e39..8acf0492 100644 --- a/.jjb-test/expected-xml/gerrit-maven-sonar +++ b/.jjb-test/expected-xml/gerrit-maven-sonar @@ -100,13 +100,21 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. STAGING_PROFILE_ID Nexus staging profile ID. - uuddlrlrba + ARCHIVE_ARTIFACTS Artifacts to archive to the logs server. + + SONAR_MAVEN_GOAL + 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". + + sonar:sonar + @@ -220,9 +228,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. - SONAR_HOST_URL=$SONAR_URL -SONAR_MAVEN_GOAL=sonar:sonar - + SONAR_HOST_URL=$SONAR_URL diff --git a/.jjb-test/expected-xml/github-maven-sonar b/.jjb-test/expected-xml/github-maven-sonar index 13a3a85b..713ccb3a 100644 --- a/.jjb-test/expected-xml/github-maven-sonar +++ b/.jjb-test/expected-xml/github-maven-sonar @@ -95,13 +95,21 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. STAGING_PROFILE_ID Nexus staging profile ID. - uuddlrlrba + ARCHIVE_ARTIFACTS Artifacts to archive to the logs server. + + SONAR_MAVEN_GOAL + 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". + + sonar:sonar + @@ -185,9 +193,7 @@ For example '<1.0.0' or '>=1.0.0,<2.0.0'. - SONAR_HOST_URL=$SONAR_URL -SONAR_MAVEN_GOAL=sonar:sonar - + SONAR_HOST_URL=$SONAR_URL diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 6d756669..8d4d837b 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -662,6 +662,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 +675,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 +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}'