Trigger periodic job in Hudson only if last execution of another job is successful
I have a job NIGHTLY
that runs one time each night by a periodical timer.
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:
So you would still have to check the status of FOO
job, but at least you would check it right after FOO
job completion.
精彩评论