开发者

Build job if some specific last job build was successful

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜