Interview Prep/CI/CD/Pipeline Design and Architecture

How do you make a pipeline idempotent and safe to re-run?

IntermediateProductionPipeline Design and Architecture
Answer

Every step should produce the same end state if run twice: use helm upgrade --install, kubectl apply, terraform apply with state locking, and aws s3 sync rather than append operations; make tag pushes tolerant of existing tags with the same digest; use unique deployment IDs; and avoid steps that send emails or create tickets without deduplication. Re-running a failed deployment job must not require manual cleanup, otherwise people stop trusting the "retry" button.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Pipeline Design and Architecture