MOnsDaR
MOnsDaR

Reputation: 8654

Optionally build multiple jobs in a row

We currently have created several jobs for our components. These components all depend on each other like the following: A -> B -> C

Currently it is possible to run these jobs separately independent from each other. If someone is running C the build uses A and B artifacts from a previous build.

Now it should be possible to optionally build these jobs in a row. My first thought was some kind of a BuildAll-job which starts the other jobs in the right order, but it does not seem to be possible to start other jobs in a buildstep.

Solving this by using the Build other projects-option is not a solution, because this would always trigger the other builds if someone e.g. starts A.

So anyone got an idea on how to solve this? Is something like this possible? Perhaps I missed an option/plugin to use other jobs as buildsteps?

Upvotes: 1

Views: 607

Answers (2)

craigforster
craigforster

Reputation: 2669

I would look at using the Parameterized Trigger plugin:

https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin

It allows you to trigger another job as a build step, with parameters if you need them. This would allow you to create BuildAll job that calls A, then B, then C in sequence.

Upvotes: 1

Sagar
Sagar

Reputation: 9503

Have you considered:

https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin

This can help you with the "Build-All" step if you want to go down that path.

However, one part that I do not understand is that,

if A -> B -> C,

how are any optional? If you can clarify, might be able to help you better.

Upvotes: 1

Related Questions