开发者

Trigger periodic job in Hudson only if last execution of another job is successful

开发者 https://www.devze.com 2023-01-17 04:50 出处:网络
I have a job NIGHTLY that runs one time each night by a periodical timer. Now I want to change so that the NIGHTLY job is only run if the last execution of another job FOO in Hudson is successful.

I have a job NIGHTLY that runs one time each night by a periodical timer.

Now I want to change so that the NIGHTLY job is only run if the last execution of another job FOO in Hudson is successful.

Note:

  • Job FOO is run many times each day and is triggered by SCM.
  • NIGHTLY should only be run one开发者_C百科 time per night and at a specific time.

Currently I have another job NIGHTLY_TRIGGER that runs a bash script that access the remote API of job FOO to check if job FOO is successful and if so triggers the NIGHTLY job.

Are there a nicer/cleaner way to do this? (preferable by using some Hudson plugins)


You could check out the Hudson Join Plugin which is made for this kind of scenario (wait for the conclusion of a job before executing another one).
The end result wouldn't be much different from what you are already doing, but this would be neatly parameterized:

Trigger periodic job in Hudson only if last execution of another job is successful

So you would still have to check the status of FOO job, but at least you would check it right after FOO job completion.

0

精彩评论

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

关注公众号