hdmq
hdmq

Reputation: 277

How execute a job from other job in Jenkins?

I have a job that updated my workspace and after will compile projects.

I need have a job (A) for update my workspace and other job (B) that first executed the job A (like a prebuild) and after will compile my project.

Upvotes: 1

Views: 1366

Answers (1)

Richard Williams
Richard Williams

Reputation: 301

Under the "Build Triggers" option on the job configuration page, check the "Build after other projects are built" checkbox, and then enter the name of the precursor job in the textbox which appears. You can also configure whether you would like the job to run only if its precursor is stable, for example.

So in this case, you would configure job B to run upon completion of job A (as described above), probably requiring that job A completed successfully.

Upvotes: 4

Related Questions