Conditionally Trigger Custom Build

Hi,

we have a fairly central Buildjob which is triggerd by VCS changes.Depending on the kind of change, it is neccessary to run other Buildjobs on successful completion of the Job.

Currently, we set a couple of (boolean) configuration parameters in one buildstep of the main Job depending on the type of change. An addional (last) buildstep then runs a quite complicated set of curl requests and sed statements to find the required BuildID and trigger the BuildJob based on the various values of said parameters.

As this is a quite complicated and fragile set up, I would like to know if there is a possibility to set a (artefact|System Property|event|...whatever...) and have another BuildJob trigger on successful Build of $mainJob if this is set.
Obviously, this should not be exclusive, as the "secondary" buildjobs might have additional triggers (as in VCS-Trigger, manual run, ...).

Has anyone done this before and could gi

Cheers,

Tobias

1 comment
Comment actions Permalink

Hi Tobias,

You can create the following build chain: A (main) < B1...Bn, where Bn snapshot depend on A build configuration. For build configurations Bn set up VCS triggers with needed trigger rules. In this case, if build configuration B1 is triggered it will also added build configuration A to the queue. So build chain A > B1 will be built.

0

Please sign in to leave a comment.