From 766dbef8a63d824d6e551d4f179806521be95d13 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Mon, 29 Jan 2024 14:59:05 -0800 Subject: [PATCH] Fix: Add Java update alternatives step This is to allow users to use a different Java version for their Sonarqube builds. Issue: RELENG-5099 Signed-off-by: Jessica Wagantall Change-Id: I7a0915bb41ec18e9eeed57f5049e72cacf4333f6 --- docs/jjb/lf-python-jobs.rst | 1 + jjb/lf-python-jobs.yaml | 3 +++ .../notes/update-sonarqube-java-alternatives-e85ec6a90aa2a99e.yaml | 5 +++++ 3 files changed, 9 insertions(+) create mode 100644 releasenotes/notes/update-sonarqube-java-alternatives-e85ec6a90aa2a99e.yaml diff --git a/docs/jjb/lf-python-jobs.rst b/docs/jjb/lf-python-jobs.rst index d7553ec4..5df0e26b 100644 --- a/docs/jjb/lf-python-jobs.rst +++ b/docs/jjb/lf-python-jobs.rst @@ -446,6 +446,7 @@ Plug-in configurations :disable-job: Whether to disable the job (default: false) :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :github-url: URL for Github. (default: https://github.com) + :java-version: JDK version to use. (default: openjdk17) :parallel: If different from false, try pass this parameter to tox option "--parallel" to parallelize jobs in the envlist (and then activate the option "--parallel-live" to display output in logs). diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 4eb134b1..18268ebc 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -779,6 +779,7 @@ disable-job: false git-url: "$GIT_URL/$PROJECT" github-url: "https://github.com" + java-version: openjdk17 parallel: false pre-build-script: "# pre-build script goes here" python-version: python3 @@ -828,6 +829,8 @@ builders: - lf-infra-pre-build + - lf-update-java-alternatives: + java-version: "{java-version}" - lf-infra-tox-install: python-version: "{python-version}" - shell: "{pre-build-script}" diff --git a/releasenotes/notes/update-sonarqube-java-alternatives-e85ec6a90aa2a99e.yaml b/releasenotes/notes/update-sonarqube-java-alternatives-e85ec6a90aa2a99e.yaml new file mode 100644 index 00000000..e820ff14 --- /dev/null +++ b/releasenotes/notes/update-sonarqube-java-alternatives-e85ec6a90aa2a99e.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Add Java update alternatives step to allow users to use a different Java + version for their Sonarqube builds. -- 2.16.6