From: Jessica Wagantall Date: Thu, 18 Jan 2024 20:51:13 +0000 (-0800) Subject: Fix: Update lf-infra-sonar macro to use JDK version X-Git-Tag: v0.89.8^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=35e5c8dbf87dc8657bfa1c2631d641f56d81ed07;p=releng%2Fglobal-jjb.git Fix: Update lf-infra-sonar macro to use JDK version Issue: RELENG-5099 Signed-off-by: Jessica Wagantall Change-Id: I90875727fd93767496f72a26d3acdb3055dc7e8e --- diff --git a/docs/jjb/lf-macros.rst b/docs/jjb/lf-macros.rst index 0ad15060..112fd2f2 100644 --- a/docs/jjb/lf-macros.rst +++ b/docs/jjb/lf-macros.rst @@ -354,6 +354,7 @@ Requires ``SonarQube Scanner for Jenkins`` :sonar-properties: Sonar configuration properties. (default: "") :sonar-java-opts: JVM options. (default: "") :sonar-additional-args: Additional command line arguments. (default: "") + :sonar-jdk: JDK version to use. (default: openjdk17) lf-infra-sonar-with-prescan --------------------------- diff --git a/docs/jjb/lf-python-jobs.rst b/docs/jjb/lf-python-jobs.rst index 5aeb9212..d7553ec4 100644 --- a/docs/jjb/lf-python-jobs.rst +++ b/docs/jjb/lf-python-jobs.rst @@ -459,6 +459,7 @@ Plug-in configurations :sonar-additional-args: Command line arguments. (default: '') :sonar-java-opts: JVM options. For example, use option -Xmx to increase the memory size limit. (default: '') + :sonar-jdk: JDK version to use. (default: openjdk17) :sonar-project-file: The file name with Sonar configuration properties (default: sonar-project.properties) :sonar-properties: Sonar configuration properties. (default: '') diff --git a/jjb/lf-c-cpp-jobs.yaml b/jjb/lf-c-cpp-jobs.yaml index 14bb46e9..d59d073e 100644 --- a/jjb/lf-c-cpp-jobs.yaml +++ b/jjb/lf-c-cpp-jobs.yaml @@ -213,6 +213,7 @@ sonar-project-file: sonar-project.properties sonar-properties: "" sonar-task: "" + sonar-jdk: openjdk17 parameters: - lf-infra-parameters: @@ -237,6 +238,7 @@ sonar-properties: "{sonar-properties}" sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" + sonar-jdk: "{sonar-jdk}" - job-template: name: "{project-name}-autotools-sonarqube" @@ -613,6 +615,7 @@ sonar-project-file: "sonar-project.properties" sonar-properties: "" sonar-task: "" + sonar-jdk: openjdk17 parameters: - lf-infra-parameters: @@ -643,6 +646,7 @@ sonar-properties: "{sonar-properties}" sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" + sonar-jdk: "{sonar-jdk}" - job-template: name: "{project-name}-cmake-sonarqube" diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 9e346e42..20b20114 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -2186,6 +2186,7 @@ sonar-properties: "" sonar-java-opts: "" sonar-additional-args: "" + sonar-jdk: openjdk17 gerrit_trigger_file_paths: - compare-type: REG_EXP @@ -2238,6 +2239,7 @@ sonar-properties: "{sonar-properties}" sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" + sonar-jdk: "{sonar-jdk}" - _lf_sonar_builders_prescan: &lf_sonar_builders_prescan name: lf-sonar-builders-prescan @@ -2265,6 +2267,7 @@ sonar-properties: "{sonar-properties}" sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" + sonar-jdk: "{sonar-jdk}" - _lf_sonar_gerrit_common: &lf_sonar_gerrit_common name: lf-sonar-gerrit-common diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index 2d7a1fe3..3ceda0d1 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -393,6 +393,7 @@ properties: "{sonar-properties}" java-opts: "{sonar-java-opts}" additional-arguments: "{sonar-additional-args}" + jdk: "{sonar-jdk}" - builder: name: lf-infra-sonar-with-prescan diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 738a0624..4eb134b1 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -794,6 +794,7 @@ sonar-project-file: "sonar-project.properties" sonar-properties: "" sonar-task: "" + sonar-jdk: openjdk17 ##################### # Job Configuration # @@ -838,6 +839,7 @@ sonar-properties: "{sonar-properties}" sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" + sonar-jdk: "{sonar-jdk}" publishers: - lf-infra-publish diff --git a/releasenotes/notes/update-sonarqube-java-2cf551537f32adf5.yaml b/releasenotes/notes/update-sonarqube-java-2cf551537f32adf5.yaml new file mode 100644 index 00000000..b2bcdd39 --- /dev/null +++ b/releasenotes/notes/update-sonarqube-java-2cf551537f32adf5.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Update lf-infra-sonar macro to allow the sonar builder to take a specific + JDK version.