Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: build one job after another with some delay

Tags:

jenkins

I have 2 jobs in Jenkins: QA and Dev. In Dev job I checked "Build after other projects are built" option and set project name = QA so that QA job will be built after Dev job is built. But in my particular situation I need that QA job started building in 5 mins after Dev job is built. How can I do it? maybe I can add some build step with some data to add this delay ?

TIA, Anna

like image 323
Annet Avatar asked Jul 19 '13 14:07

Annet


People also ask

How run Jenkins job one after another?

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.

How do I add a delay in Jenkins?

There is a "Quiet Period" option in the Advanced Project Options available. You can enter a value of 300 (its in seconds) to delay the start of the job by 5 mins. Update: now this Quiet Period option is a check box in Build Triggers option.

How do I run two jobs sequentially in Jenkins?

Many 'phases' can be set up as part of the MultiJob project and each phase "contains" one or more "other" Jenkins jobs. When the MultiJob project is run, the phases will be run sequentially. Therefore, in order to run N jobs sequentially, add N phases to your MultiJob project, and then add one job to each phase.

How do I trigger another job in Jenkins post build?

Use build job plugin for that task in order to trigger other jobs from jenkins file. You can add variety of logic to your execution such as parallel ,node and agents options and steps for triggering external jobs.


1 Answers

There is a "Quiet Period" option in the Advanced Project Options available. You can enter a value of 300 (its in seconds) to delay the start of the job by 5 mins.

like image 184
rajasaur Avatar answered Sep 21 '22 07:09

rajasaur