I want Jenkins to run a regularly scheduled build A only if another regularly scheduled build B has been successful. If the build A has failed the this way dependent build B should not run (since it would fail also). I don't want to trigger B from A directly since B as a completely other schedule (runs more infrequently).
You can follow the below steps to trigger a Jenkins pipeline in another Jenkins pipeline. Select a job that triggers a remote one and then go to Job Configuration > Build section > Add Build Step > Trigger builds on remote/local projects option.
Jenkins allows for parallel execution of builds for a Job. Job configuration page has a check box, "Execute concurrent builds if necessary". Also, in the master node configuration set the "# of executors" field to more than 1. Once these two are done, parallel job execution is enabled.
In the Build Triggers section, instead of selecting Build Periodically, let's select Poll SCM. As soon as we do that, we should see a text box with Label Schedule. Let's type */5 * * * * in this box, which means we want to schedule the job to run every 5 minutes: Let's scroll up to Source Code Management section.
Try BuildResultTrigger Plugin - you can set it in job B to poll the results of job A with the desired (un)frequency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With