9

My question is fairly straightforward: With a Freestyle Jenkins project under "Advance Project Options" I can select two configuration options that help prevent conflicts between different projects (that may arise e.g. when one project updates a set of header files while another project is including these):

  • Block build when upstream project is building
  • Block build when downstream project is building

For a Pipeline or Multibranch project these configuration options are unavailable, and I am (so far without success) looking for a way to achieve the same effect for a Pipeline or Multibranch project.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
StuporMundi
  • 353
  • 4
  • 10
  • 1
    I seem to be the only person needing this... My workaround is using a freestyle project that contains all the trigger and dependency logic, but only one build step which invokes the pipeline project and makes the outcome of the pipeline build its own result. The pipeline project on the other hand, performs the build, but does not have any triggers or dependencies. – StuporMundi Sep 23 '16 at 14:10
  • 3
    Hi StuporMundi, I also have this problem and find it incredibly frustrating, especially when there are a lot of projects. I will code a fix and submit a PR soon. I'll post here when done – satoshi Apr 21 '17 at 10:07
  • 1
    Offical ticket: https://issues.jenkins-ci.org/browse/JENKINS-37718 – satoshi Apr 24 '17 at 10:10
  • You may consider checking the JSON api of a build on a loop that runs on repeat. It isn't pretty but it could be a workaround. – kirkpatt Oct 25 '17 at 19:54

1 Answers1

0

You may solve this with the Lockable Resource Plugin.

By creating a shared resource used by upstream, and downstream, projects. Let the pipeline wait for it to be available.

Tomas Bjerre
  • 3,270
  • 22
  • 27