Synchronization between execution of jobs

23 views
Skip to first unread message

hari prasad

unread,
Apr 20, 2015, 1:45:02 AM4/20/15
to jenkins...@googlegroups.com
Hi,

I would like to get few suggestions regarding synchronization of jobs(possibly jobs from different chain) execution in jenkins.

My scenario is we have a hardware setup which is common for two chain jobs.

Job chains are as,
Chain A
job_A_1 -> job_A_2 -> job_A_3

Chain B
job_B_1 -> job_B_2 -> job_B_3

Now when any job in Chain B has started we would like to wait for the entire jobs in Chain B to complete and then jobs in queue in Chain A should start.

Place where this sync doesn't happen is when job_B_2 is running and job_A_1 is waiting in queue, now while job_B_3 is being triggered job_A_1 in queue is executed.
Since in my use case job_B_2 prepares some settings for hardware for rest of the chain jobs, this would fail chain jobs in Chain A.

Any suggestion for this scenario? (locks and latches doesn't provide synchronization beyond a particular job)

BR,
Hari

corneil....@gmail.com

unread,
Apr 20, 2015, 3:53:10 AM4/20/15
to jenkins...@googlegroups.com
The Build Blocker Plugin will allow to prevent a build from running if another build is already running by providing a list of names.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/29c5a4a6-2639-47b0-9b5b-228997a8554f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hari prasad

unread,
Apr 20, 2015, 11:07:21 AM4/20/15
to jenkins...@googlegroups.com
But Build blocker plugin unfortunately blocks only until current job in Chain completes, we need to block until all dependent jobs in chain completes, then allow any jobs in queue.

Vinu Joseph

unread,
Apr 21, 2015, 9:17:05 AM4/21/15
to jenkins...@googlegroups.com
Hi Hari,
In the test-suite.xml file where you define the automation test-cases, mention preserve order=true i.e

<suite name="Suite" preserve-order="true">

Now the testcases will get executed in the order you define them.

Regards,

VJ

https://itisatechiesworld.wordpress.com/

Reply all
Reply to author
Forward
0 new messages