From 35e5c8dbf87dc8657bfa1c2631d641f56d81ed07 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Thu, 18 Jan 2024 12:51:13 -0800 Subject: [PATCH] Fix: Update lf-infra-sonar macro to use JDK version Issue: RELENG-5099 Signed-off-by: Jessica Wagantall Change-Id: I90875727fd93767496f72a26d3acdb3055dc7e8e --- docs/jjb/lf-macros.rst | 1 + docs/jjb/lf-python-jobs.rst | 1 + jjb/lf-c-cpp-jobs.yaml | 4 ++++ jjb/lf-ci-jobs.yaml | 3 +++ jjb/lf-macros.yaml | 1 + jjb/lf-python-jobs.yaml | 2 ++ releasenotes/notes/update-sonarqube-java-2cf551537f32adf5.yaml | 5 +++++ 7 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/update-sonarqube-java-2cf551537f32adf5.yaml 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. -- 2.16.6