tags:

views:

24

answers:

1

I have a job A that is run every hour. Also job B is run after each commit to github (integration tests job). How can i know before running job A if last build of job B was successful and discard build of A if last build of B was unstable? Thanks.

A: 

As far as I know, this is not possible when you use hudson out of the box. Without any specifics about your job dependencies it is also not easy to design the right workaround.

Different Options:

  1. If your job A runs fast, let it run anyway.
  2. Since job A runs every hour, can you go away with job B running every hour. In this case Job B is successful it will trigger job A.
  3. Have an external shell script that triggers job A every hour. Before triggering, check the status of your last build from job B (http:///job//api/xml?xpath=/mavenModuleSetBuild/result/text%28%29). For info on how to trigger a build have a look at the "Trigger builds remotely" option in your job.

This list is probably not exhaustive.

Peter Schuetze

related questions