Teams ask for a "golden pipeline" but still need custom test steps. How do you design for extension?
AdvancedScenarioReuse at Scale: Reusable Workflows & Actions
Answer
Situation read → Balance standardization and flexibility.
What I'd do →
- Split the golden pipeline into stages as separate reusable workflows (build, scan, deploy) rather than one monolith.
- Teams own their test job in their repo and chain:
test(theirs) thenuses: platform/build-image.ymlthenuses: platform/deploy-eks.yml. - Offer inputs for common knobs (Dockerfile path, build args, test command), not arbitrary script injection points.
- Enforce non-negotiables (scan, provenance) inside the platform workflows and via rulesets.
Why → Composable blocks beat one template with 40 inputs.
Interview tip → "Paved road, not a cage."
More on Reuse at Scale: Reusable Workflows & Actions
Forty microservice repos each have a slightly different copy of the same build workflow. How do you standardize?IntermediateA team wants to share "checkout, setup Java, Maven cache, run Sonar" steps. Reusable workflow or composite action?BeginnerA shared reusable workflow change broke 120 pipelines on Monday. How do you prevent a repeat?IntermediateA called reusable workflow needs a Sonar token, an npm token and AWS access. How do you pass them?AdvancedYou want to ensure only the central deploy workflow can assume the production AWS role, not arbitrary workflows in app repos. How?AdvancedYou need an action that comments a Terraform plan summary on PRs and must work on Linux and Windows. Which kind?Beginner