You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello :)
During my work with Nuke, I've come across some places where increased extensibility would be a benefit. That's why I've developed an approach with custom steps. I would like to share with you my implementation.
As in shown in Usage Example, I think it is a good idea to add possibility to write own custom steps and address them by attributes. Considering the current architecture of Nuke, it gives a great extensibility without big amount of changes.
I've written the usage example from the top of my head because at this moment I do not have access to my code.
Usage Example
publicclassTestBuild:NukeBuild{[AzureDevOpsDownloadSecureFileStep("securefile.zip")]publicTargetTest=> _ =>_.DependsOn(Compile).Produces(TestResultDirectory/"*.trx").Produces(TestResultDirectory/"*.xml").Partition(2);}// User provided implementationsclassAzureDevOpsDownloadSecureFileStepAttribute:AzurePipelineStepAttribute{publicAzureDevOpsDownloadSecureFileStepAttribute(stringfileName){FileName=fileName;}publicstringFileName{get;}publicoverrideAzurePipelinesStepGet(){returnnewAzureDevOpsDownloadSecureFileStep(FileName);}}classAzureDevOpsDownloadSecureFileStep:AzurePipelinesStep{publicAzureDevOpsDownloadSecureFileStep(stringfileName){FileName=fileName;}publicstringFileName{get;}publicoverridevoidWrite(CustomFileWriterwriter){writer.WriteLine("- task: DownloadSecureFile@1");using(writer.Indent()){writer.WriteLine("inputs:");using(writer.Indent()){writer.WriteLine($"secureFile: '{FileName}'");}}}}
Alternative
Alternative is to write all YAML pipelines by hand, but I do not want that as in a team not everybody must be fluent with .yml files. That's why I like the idea to generate as much pipeline code as possible by Nuke.
Description
Hello :)
During my work with Nuke, I've come across some places where increased extensibility would be a benefit. That's why I've developed an approach with custom steps. I would like to share with you my implementation.
As in shown in Usage Example, I think it is a good idea to add possibility to write own custom steps and address them by attributes. Considering the current architecture of Nuke, it gives a great extensibility without big amount of changes.
I've written the usage example from the top of my head because at this moment I do not have access to my code.
Usage Example
Alternative
Alternative is to write all YAML pipelines by hand, but I do not want that as in a team not everybody must be fluent with
.yml
files. That's why I like the idea to generate as much pipeline code as possible by Nuke.Could you help with a pull-request?
Yes [#1407]
The text was updated successfully, but these errors were encountered: