I use a templating tool (m4) so I can build up a groovy script using macros. In the first stage of my Jenklinsfiie, I call a bash script that generates a groovy script, which I then load and execute. The loaded script has N stages. Note that if the ordering of your stages changes, jenkins will stop showing history, so I try to always add stages at the end.
On Tuesday, October 1, 2019 at 11:43:25 AM UTC-4, Jeff Sault wrote: > > Does anyone know of any libraries/tools that will allow me to > add/remove/update sections of a Jenkinsfile programatically? I have a load > of different projects which I need to update to include some new mandatory > parameters. I'd like to go down the 'shared library' route but in this > instance its not really possible. Parsing the jenkinsfile is non-trivial > but I assume theres something in groovy/jenkins land which can already do > the job. > > Thanks > Jeff > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7a2da374-5734-4eb9-a4a2-fed3254d8ca4%40googlegroups.com.