Interview Prep/CI/CD/Fundamentals and Pipeline Design

Compare ephemeral and long-lived static build agents.

AdvancedConceptFundamentals and Pipeline Design
Answer

Ephemeral agents (a fresh VM or pod per job) give clean, reproducible environments, no state leakage between jobs, and no leftover credentials. They scale to zero and limit blast radius if a job is compromised. The cost is cold starts and no warm caches, which you solve with remote caches or registry-based layer caches.

Static agents keep warm caches and are fast, but accumulate disk junk, drift in tool versions ("works on agent-3"), and can leak secrets or poisoned caches between builds, which is a real supply-chain risk, especially for self-hosted runners on public repos.

We run ephemeral agents (Jenkins Kubernetes plugin, GitHub ARC, GitLab Kubernetes executor) and use caches deliberately.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Fundamentals and Pipeline Design