Fully customizable pipeline definitions #1230
KuraiAndras
started this conversation in
Show and tell
Replies: 1 comment 4 replies
-
Why use a C# DSL to generate a pipeline instead of writing the pipeline manually? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have encountered a number of projects where I had to customize pipelines in ways that the Nuke pipeline attributes could not handle. My usual solution would be to either manually write the pipeline or do some hacky workaround to generate a customized pipeline file.
I have been thinking and came up with a solution I would like to pursue, and I would like to get some critique before pushing forward (If I finish this then it will be open sourced). Keep in mind that I have mostly used nuke with GitHub Workflows and Azure Pipelines.
I like nuke's generated pipelines, but they have a few problems:
So, I thought about making an alternative which gives you full control of the generated files.
The sample build we want to run:
Current generation parameters:
My approach:
Right now, this will produce the following output:
Stuff that's missing but might be possible:
.Produces()
.Requires()
So how does this work?
The basic idea is that surely GitHub workflows can be represented with simple POCOs which are then serialized to YAML. So the
GithubWorkflowDefinition
created by the factory will be serialized using tools provided by nuke'sConfigurationAttributeBase
some code from the implementation:
Stuff that is not in scope:
I hope some of you might like this idea, so if you have some feedback, please share (even if you don't like this idea!)
Beta Was this translation helpful? Give feedback.
All reactions