:build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
:build-timeout: Timeout in minutes before aborting build. (default: 60)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :java-opts: Java options. Example: -Xmx1024m
:java-version: Version of Java to use for the build. (default: openjdk8)
:mvn-clean-install: Run maven clean install before the code scan. (default: false)
:mvn-global-settings: The name of the Maven global settings to use for
- builder:
name: lf-infra-wss-mvn-clean-install
builders:
+ - inject:
+ properties-content: JAVA_OPTS={java-opts}
- conditional-step:
condition-kind: boolean-expression
condition-expression: "{mvn-clean-install}"
disable-job: false
git-url: "$GIT_URL/$PROJECT"
github-url: "https://github.com"
+ java-opts: ""
java-version: openjdk8
mvn-clean-install: false
mvn-global-settings: global-settings
- lf-update-java-alternatives:
java-version: "{java-version}"
- lf-infra-wss-mvn-clean-install:
+ java-opts: "{java-opts}"
mvn-clean-install: "{mvn-clean-install}"
mvn-version: "{mvn-version}"
mvn-pom: "{mvn-pom}"
--- /dev/null
+---
+fixes:
+ - |
+ Allow java-opts to be defined in WhiteSource scans. This
+ avoids java heap failures.
wss_unified_agent_url="https://s3.amazonaws.com/unified-agent/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar"
wget -nv "${wss_unified_agent_url}" -O "${jar_location}"
echo "---> Running WhiteSource Unified Agent CLI ..."
-java -jar "${jar_location}" -c wss-unified-agent.config \
+java ${JAVA_OPTS:-} -jar "${jar_location}" -c wss-unified-agent.config \
-product "${WSS_PRODUCT_NAME}" -project "${WSS_PROJECT_NAME}" \
-projectVersion "${GERRIT_BRANCH}" ${WSS_UNIFIED_AGENT_OPTIONS:-}
rm "${jar_location}"