Interview Prep/Jenkins/Platform: plugins, JCasC & Kubernetes agents

Builds in Kubernetes need a Maven cache, and downloads take 6 minutes per build. What do you implement?

IntermediateScenarioPlatform: plugins, JCasC & Kubernetes agents
Answer

Situation read → Ephemeral pods start with an empty ~/.m2.

What I'd do →

  1. Point Maven at a Nexus/Artifactory proxy inside the cluster via settings.xml mirror; this alone usually drops time to under a minute.
  2. Optionally mount a shared PVC for ~/.m2/repository (ReadWriteMany), accepting concurrency risks, or a per-node cache.
  3. Use mvn -B -T 1C and dependency:go-offline in a cached image layer for stable dependencies.

Why → A nearby proxy turns internet downloads into LAN transfers and adds resilience.

Interview tip → Mention that baking dependencies into the build image is another option for slow-changing deps.

All Jenkins questions Roadmap: Jenkins

More on Platform: plugins, JCasC & Kubernetes agents