Search code examples
jenkinsbuild-process

Publish finished build to another Jenkins


I'm using two Jenkins servers of the same version with the same plugins on two machines. Let's call one of them public Jenkins and the other private Jenkins. I want to start a build A on the private server and afterwards start a build B on the public server.

I tried to solve this with the Build Publisher Plugin. I configured the private server by entering the server URL and credentials of the public. I set that build A should be published to the public server.

This works, the build job A is visible afterwards on the public server. I configured that Build job B should be triggered when the published job A is done, but this doesn't work. Build A is visible on the public server, but although the build process was successful on private machine, there are no information about last build date and status.

Is there anything that I missed? Is it really possible to trigger a build job after a subscribed build job has finished or is there a easier way?

Any help is appreciated!


Solution

  • The Build Publisher Plugin reads:

    [...] then send the results to another Jenkins which is facing the outside world.

    [...] build records from private Jenkins is sent to public Jenkins, through HTTP.

    I interpret this as the results being published just for being viewed on the public server.

    Just like a book publisher: He or she doesn't write books or continuations of books. He or she just publishes them for reading.

    See Calling a jenkins build from outside of jenkins? for how to trigger a build on a Jenkins server from remote, i.e. from your private on your public.