0

Title sounds confusing but here's what I mean.

I have job A, and if it succeeds, it runs job 1, 2, 3, and 4. That's how it's configured in its build trigger.

I have job B, and I want to make it run 1, 2, 3, and 4 also after it succeeds.

BUT, I don't want job 1, 2, 3, or 4 to run if either A or B have already ran them. For example, if both job A and job B are scheduled to run, then it would double build 1, 2, 3, and 4, and that's not what I want (will cause git tag issues, builds, etc).

How can I go about doing this, and can I do it through the website? That's what I'm familiar with.

Jobs 1, 2, 3, and 4 are just used for names; they don't have to run after each other.

  • Do you mean that 1-2-3-4 must run in serial to completion before running them again? So instead of a situation like A-1a-2a-B-1b-3a-2b-4a-3b-4b you want to enforce A-1a-2a-B-3a-4a-1b-2b-3b-4b ? – bto Apr 19 '18 at 19:09
  • Sorry, 1, 2, 3, 4 are just made up job names. They don't need to run one after another. – 50th Mersenne Prime Apr 19 '18 at 19:16
  • I think the best you'll probably be able to do is: "If A or its downstream jobs are running, wait for them to complete, then allow B to run (and trigger its downstream jobs)." If that's sufficient, there are probably some solutions. – bto Apr 19 '18 at 19:35
  • Thanks, but because A's downstream jobs ran, B's downstream shouldn't run because they had already ran (from A). – 50th Mersenne Prime Apr 24 '18 at 15:29
  • Sorry, still trying to work out the exact logic. Do you want something like "If job B is kicked off while any of A,1,2,3,4 are currently running or queued, allow B to run but do not trigger downstream jobs?" – bto Apr 24 '18 at 15:52

1 Answers1

0

You can use option "Build after other projects are built", Inside "Build Triggers" and set your configuration option.

Configuration section

Yuri
  • 1,691
  • 2
  • 13
  • 12