JAVA_OPTIONS are required to execute sonar jobs
Currently there is no options to pass this variable
so adding this option to pass from the project.yaml
Issue: RELENG-2152
Signed-off-by: Suresh Channamallu <schannamallu@linuxfoundation.org>
Change-Id: I0842f222fc7abf11b258b0691167b701bb319458
git-url: "$GIT_URL/$PROJECT"
github-url: "https://github.com"
java-version: openjdk8
+ java-opts: ""
mvn-global-settings: global-settings
mvn-goals: clean install
mvn-opts: ""
name: ARCHIVE_ARTIFACTS
default: "{archive-artifacts}"
description: Artifacts to archive to the logs server.
+ - string:
+ name: JAVA_OPTS
+ default: "{java-opts}"
+ description: |
+ Java options. Example: -Xmx1024m
- string:
name: SONAR_MAVEN_GOAL
default: "{sonar-mvn-goal}"
--- /dev/null
+---
+fixes:
+ - |
+ Add support for JAVA_OPTIONS in sonar job.
+ Some of the maven build options in the sonar job require to
+ set the JAVA_OPTIONS to specific value for the build to pass
+ This option will help to pass the JAVA_OPTIONS from the template.
# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
# shellcheck disable=SC2086
-$MVN $MAVEN_GOALS \
+_JAVA_OPTIONS="$JAVA_OPTS" $MVN $MAVEN_GOALS \
-e -Dsonar \
${params[*]} \
$MAVEN_OPTIONS $MAVEN_PARAMS