14

Is there any way in jenkins to block a given task on all its downstream tasks? I have a series of functional test phases, and each needs to run against a server after deployment. The server should not be updated while tests are running, however.

So I have jobs:

A -> B -> C

I need A to block until C completes.

How can I do this?

Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406

2 Answers2

14

Take a look at the Advanced Project Options, "Block build when downstream project is building" option for project A. I believe that will prevent multiple instances of A running until all downstream projects (ie, B and C) have completed.

Jason Swager
  • 6,421
  • 6
  • 41
  • 56
9

As Jason mentioned the setting is under the "Advanced Project Options" section and looks like the following:

Block build when downstream project is building

Andrew Thompson
  • 2,396
  • 1
  • 21
  • 23
  • 5
    Note that its slightly difficult to find because you'll need to click the "Advanced" button in order for the above set of options to display. This was available on Jenkins ver. 1.458 for me. – Andrew Thompson May 08 '12 at 00:36