Issue
- After adding the 'hostAliases' in the environment, the Jenkins builds are failing with the below error:
ERROR: the command "[ lcp, deploy, --only build, ----]" had an exit value of 137.
Environment
- Liferay PaaS
- Liferay DXP 7.4
Resolution
- When Jenkins builds fail due to an exit value of 137, it means a container or pod is trying to use more memory than it's allowed.
- Increase the Gradle memory by using the following environment variable:
LCP_CI_GRADLE_JVM_ARGS": "-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8