Merge "Add option to pass JAVA_OPTIONS"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 18 Jul 2019 16:03:54 +0000 (16:03 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Thu, 18 Jul 2019 16:03:54 +0000 (16:03 +0000)
jjb/lf-maven-jobs.yaml
releasenotes/notes/fix-add-java-option-support-sonar-jobs-cad478912e491936.yaml [new file with mode: 0644]
shell/maven-sonar.sh

index 4b4ad8e..a37aaac 100644 (file)
     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}"
diff --git a/releasenotes/notes/fix-add-java-option-support-sonar-jobs-cad478912e491936.yaml b/releasenotes/notes/fix-add-java-option-support-sonar-jobs-cad478912e491936.yaml
new file mode 100644 (file)
index 0000000..63b733f
--- /dev/null
@@ -0,0 +1,7 @@
+---
+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.
index e78d156..d370748 100644 (file)
@@ -25,7 +25,7 @@ params+=("--settings $SETTINGS_FILE")
 
 # 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