Add Jenkins Groovy Step After Creating All Jobs

How can the same Jenkins Groovy Postbuild Plugin step be added to all jobs? We have 50+ tasks, so it’s too difficult to copy the link to the desired Groovy code for each task.

+1
source share
2 answers

I usually make such bulk changes by updating the config.xml of completed jobs. Every good editor should have a search and replace function that works with files. use the following workflow.

  • close jenkins
  • Update config.xml file.
  • run jenkins

There are other possible workflows, such as the following 1. update the config.xml job file 2. reload the configuration

, , .

+1

script , Jenkins Groovy Groovy postbuild. postbild Jenkins Groovy :

https://gist.github.com/genericpenguin/9ac1b84ed7a145b3b6dd

"" . , . , postbuild Groovy script Jenkins. script, (, script).

0

All Articles