Interview Prep/CI/CD/Jenkins Build and Agent Failures

`ERROR: script returned exit code 137` during a Maven or Docker build.

AdvancedTroubleshootingJenkins Build and Agent Failures
Answer

Likely causes → Exit code 137 = SIGKILL, usually OOM kill.

Diagnose →

dmesg -T | grep -i oom
kubectl describe pod <pod> | grep -A3 'Last State'

Fix → Raise container memory limit, set MAVEN_OPTS=-Xmx1g, reduce parallel test forks.

Prevent → Size requests/limits from observed build memory, and monitor OOM events.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Jenkins Build and Agent Failures