Reputation: 89
I have 80 jenkins jobs which I want to re-build programmatically. All 80 were run with different set of parameters. I can see 2 approaches here for job x which is inside a view as well as folder,
Rebuild plugin is something which essentially does 1) but I want to do the same via code. Please suggest specific solution if possible instead of generic API links. I have gone through all XML, JSON and Python API for Jenkins but there isn't one straightforward way I could find. Thanks.
Upvotes: 1
Views: 2040
Reputation: 89
After trying for a while, I was able to come up with a groovy script which upon running in jenkins-server-url/script does the trick.
The script is hosted at https://github.com/nirzari/groovy-scripts/blob/master/rebuild.groovy
Upvotes: 2