Jenkins Parameterized Remote Trigger Plugin

29 / Jun / 2015 by Gunjan Sawhney 6 comments

At times you encounter a use case where you need to run a Jenkins job remotely from another Jenkins instance. Well, there is a way to achieve this by using Parameterized Remote Trigger plugin.

Let’s see how we can trigger parameterized or non-parameterized jobs on remote Jenkins server from another Jenkins server.


Lets say we have two Jenkins server namely JenkinsOne and JenkinsTwo and we have a job name “TEST” on JenkinsTwo which we want to trigger from JenkinsOne.

To achieve the above stated task, we need to download Parameterized Remote Trigger Plugin on JenkinsOne. You can do that by clicking on Manage Jenkins option and then choosing Manage Plugins, wherein you can search and download the desired plugin.

Our JenkinsTwo server has password based access. So to trigger a job on it, first we need to log in to the server and then build the job. For this to happen from a remote server, we need to provide credentials to it. So before triggering a remote build on JenkinsOne, set the credentials by following the below mentioned steps.

Step 1:
Go to Manage Credentials option after choosing Manage Jenkins option on your console.


Step 2:
After that, choose add domain option. As our JenkinsTwo is a remote server so we need to specify its host name here.


Step 3:
After this specify the credentials so that we can log into JenkinsTwo. Since on the JenkinsTwo server we have password based authentication, we have to choose “Username with password” option as shown in the screenshot below.


Specify scope, username and password and save the changes.



Step 4:
Now go to Configure System option after selecting Manage Jenkins option.  Under Parameterized Remote Trigger Configuration, click on Add.


Step 5:
As soon as we click on Add, the Display name field will automatically show already added remote Jenkins server which is JenkinsTwo. After checking the “Use the credentials Plugin” option, we can see the already provided credentials. Now to access the server, we need to provide JenkinsTwo address and port number.


Step 6:
Now make a new job in JenkinsOne. Here we are making this as a parameterized job, since our “TEST” job on JenkinsTwo is parameterized.


Step 7:
Now under the Build section, choose “Trigger a remotely parameterized job” option in the drop down menu of “Add build step” option as shown below.


Step 8:
After doing that, we can choose our remote Jenkins server in “Select a remote host” field.


Step 9:
Type the name of the job which you want to build on remote jenkins server i.e. “TEST” job on JenkinsTwo server in our case. Specify the parameter i.e “NAME” required by the “TEST” job. Also, we need to use the value defined here in “name” parameter as shown below. Save your configuration changes.


Step 10:
The final step remaining is to Build the job.


Step 11:
After building the job, in the Console Output we can see that the job has been remotely built if all the configuration changes have been made correctly.


Step 12:
On our remote server  “JenkinsTwo”, if we can log in, we can verify that our job has been executed with the parameter’s value that was provided on JenkinsOne server and by the same user whose credentials we provided in the  initial steps.



comments (6)

  1. Santhosh Hari

    Thats a nice explanation. Can you explain how to pass file to a remote job.
    I tried and it doesn’t work using Load external files field

  2. Sabrina

    Hi, I was wondering if you had ever run into the error: “Server returned HTTP response code: 403 for URL: my.server:8080//job……..” My JenkinsOne does not seem to be able to access JenkinsTwo or is having trouble communicating. All of my credentials are correct. Do you have any troubleshooting recommendations?

  3. Basma Shahadat

    Does this plugin work with Jenkins 2.0? Getting the following error while validating the remote host ..
    Address looks good, but we were not able to connect to it

  4. Le Vu

    Thank you the information. It is very helpful for me. For the remote job on the JenkinsTwo server, I want to pass in a file parameter to it. For Jenkins Parameterized Trigger Plugin, there is a way to pass a file to the child project. For Jenkins Parameterized Remote Trigger Plugin, I want to pass file to the remote job. How do I do that? Thank you


Leave a Reply

Your email address will not be published. Required fields are marked *