Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger a hudson job by another job which is in a different hudson

I have job A in Hudson A and Job B in Hudson B. I want to trigger job A by Job B.

like image 861
Sreedevi Avatar asked Dec 02 '22 06:12

Sreedevi


2 Answers

In your job B configuration, check the Trigger builds remotely (e.g., from scripts) checkbox and provide a token.

The help text there shows you the URL you can call to trigger a build from remote scripts (e.g. from a shell script in Hudson job A).

However, that would trigger job B no matter what the result of job A is.
Morechilli's answer is probably the best solution.

like image 158
Christopher Orr Avatar answered Dec 27 '22 09:12

Christopher Orr


I haven't used Hudson but I would guess your simplest approach would be to use the URL trigger:

http://wiki.hudson-ci.org/display/HUDSON/URL+Change+Trigger

I think there is a latest build url that could be used for this.

like image 35
morechilli Avatar answered Dec 27 '22 08:12

morechilli