Can one Jenkins Trigger a job on a remote jenkins

Viewed 31680

I have 2 Jenkins hosts, and would like First Jenkins to trigger a job on remote Jenkins based on "SUCCESS" in result on the first one. I have looked at various plugins , but they all seem to indicate ONE Jenkins host, where multiple jobs can be chained in this manner.

5 Answers

Step 1: Install following plugins in both Jenkins.

  1. Generic Webhook Trigger: Job can be triggered from http request.
  2. HTTP Request Plugin: To send http request as build step
  3. Any Build Step Plugin: To use any build step in post-build action.

Step 2: Configure job to be triggered(Jenkins B).

Step 3: In master Jenkins(Jenkins A) configure flexible publish settings in configure system to allow use all build steps as post build actions.

Step 4: In post build actions add another step “Flexible publish”. Using this any build action can be used as post-build action. Add a HTTP Request action. Provide Jenkins B webhook url in url field and save.

Related