Pipeline templates
What happened: Many teams cut-and-paste screwdriver.yaml and also have difficulty building correct, standards-compliant, maintainable pipelines.
What you expected to happen: I would love to see a reusable "pipeline" concept implemented in some way. Ideally screwdriver.yaml embodies an instance of a "pipeline" which can be configured, templatized (a "type" of pipeline), and distributed. A missing screwdriver.yaml (see #2104 ) is just a pipeline of type "generic" with generic defaults.
A pipeline could include a default set of jobs, which could be redefined, and a set of required or optional configuration variables.
A brute-force way to understand the idea is to "include" a shared canonical screwdriver.yaml, and then de-dupe all yaml entries, though there are cleaner/more robust ways to support it.
We are seeing more our Yahoo users requesting this feature. Copying from an internal ask.
At the first look parent pipelines (external config) might provide this functionality but it does not, parent pipelines are a centralised way to execute the same jobs across multiple repositories but it doesn’t allow versioning, changes in the parent pipeline affects all the child pipelines that is why this proposal is to allow a pipeline that is a template that can be versioned and instantiate on each repository and the screwdriver.yaml might have a simple reference to the pipeline definition like this example your screwdriver.yaml only has a reference to the pipeline
This might be the pipeline that deploys Java Kubernetes workloads
shared:
environment:
DO_SOMETHING_DIFFERENT: yes
template: pipeline/[email protected]
And this might be the pipeline that deploys nodejs workloads on ECS
template: pipeline/[email protected]
If changes are made in the pipeline the version is bumped to the new desired version.
This is one of the most exciting enhancements for re usability and standardization. If following the same concept as current jobs templates or commands we use stable and latest tags, even better:
template: pipeline/[email protected]
# or
template: pipeline/nodejs-ecs@stable
# or
template: pipeline/nodejs-ecs@latest
Thanks for this feature!
This feature has been released on MVP version. And now the enhancement of pipeline template is tracked under this issue. https://github.com/screwdriver-cd/screwdriver/issues/3059