Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - Executing a script before any build job built

I'd like to execute a script before I execute any project/build on a Jenkins server. I've checked out the BuildWrapper script and a couple of others.

These all seem to be based on a specific job, but I'd like to get this sorted to work across any job/build on this server.

like image 706
Michael Gall Avatar asked Nov 22 '25 11:11

Michael Gall


1 Answers

You could add an upstream job that all jobs depends on.

Specifically, In the buildsteps of your job, you can choose "Trigger/Call builds on other projects", add ParentJob and select "Block until the triggered projects finish their builds" before invoking the buildsteps of your job.

like image 147
Michael Avatar answered Nov 24 '25 01:11

Michael



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!