Interview Prep/CI/CD/Rapid-Fire Commands

Rapid-fire: how do you debug a failing pipeline job inside a runner container?

IntermediateProductionRapid-Fire Commands
Answer

Reproduce with the same image and commands locally, then inspect interactively.

docker run --rm -it -v "$PWD":/work -w /work maven:3.9-eclipse-temurin-21 bash
# inside: replay the failing script line by line
env | sort | grep -E 'CI|GIT|JAVA|PATH'
# on a Kubernetes agent pod:
kubectl -n jenkins-agents logs <pod> -c maven
kubectl -n jenkins-agents describe pod <pod>
All CI/CD questions

More on Rapid-Fire Commands