ci/cd Pipeline Architecture: Do you use one unified job for all envs, or split them up?
We are redesigning our CI/CD pipelines and trying to figure out the cleanest way to structure deployments.
Which route do you guys prefer?
- One unified job: A single parameterized job where you just pass in the environment variable (develop,
staging,prod, etc.). - Split jobs (same file): Explicitly separate jobs likE e
deploy-develop,deploy-staginganddeploy-prodsitting in the same workflow. - Hard split: Completely separate files for lower envs(develop and stage) vs. production.
I want to avoid copy-pasting YAML, but I also don't want a massive, over-engineered "smart" job that's hard to debug. What's the sweet spot?
What strategy are you following in your org?