I've dipped my toe into the world of writing Jenkins Workflow Steps; so far so good!
I've written a little hubot chat bot approval step as a kinda facade/decorator of InputStep:
whats a bit smelly though is that the hubotApprove should really configure and execute an `input` step internally
right now I've been writing a redundant 2nd line in the workflow groovy files:
hubotApprove "Do you want to stage?"
input id: 'Proceed', message: "Do you want to stage?"
When really the HubotApproveStep should be creating the InputStep / InputStepExecution internally so the user just needs to do:
hubotApprove "Do you want to stage?"
I wonder has anyone ever tried such a thing; written a Step which creates one or more child steps itself? I wasn't sure how the DI stuff worked for that kinda thing and so far my googling / searching hasn't found an example.
Anyone got any hints please?
Many thanks!
James