Wim Coenen
Wim Coenen

Reputation: 66713

How to skip a job in Jenkins if another job is in the failed state

I have two Jenkins jobs for the same project:

  1. a job for the continuous build which will run whenever there are new commits
  2. a job for the nightly build, triggered by time, which does the same thing but also some additional steps which take a very long time (e.g. slow tests, Sandcastle documentation generation, etcetera)

When the continuous build is failed at the end of the day, then I don't want the nightly build to run; I already know that it will fail. How do I configure this in Jenkins?

I have already considered using conditional build steps: this way I could skip build steps, but the build would still run. I don't want a new passed or failed build to appear in the history; I just want to skip the nightly build altogether.

Upvotes: 3

Views: 1546

Answers (1)

Ashokekumar S
Ashokekumar S

Reputation: 361

Have you tried build result trigger plugin - https://wiki.jenkins-ci.org/display/JENKINS/BuildResultTrigger+Plugin we use it for similar purpose

Upvotes: 3

Related Questions