Can a master jenkins run jobs on remote jenkins? Can a master jenkins run jobs on remote jenkins? jenkins jenkins

Can a master jenkins run jobs on remote jenkins?


Jenkins has the concept of build agents, which could perhaps fit your scenario better - there's a master that triggers the build and slaves that perform it. A build can be then restricted to some categories of slaves only (e.g. if it depends on a specific software, not present on all agents). All data is managed centrally by the master, which I believe is what you are trying to achieve.


In Jenkins it is not possible to trigger a build on a slave, i.e. where a build runs is not controlled by the one who triggers it. It is controlled by the settings of the job itself. Each job has a setting called "Restrict where this job can run".

In your case you would probably have two jobs: A and B. A would be restricted to run on "master" and B would be configured to run on "slavename". Then all that is left to do is for A to trigger B.

But you had further constraints: You want A and B check out the same version from version control and you want A and B to run in parallel. There are many ways to accomplish that but the easiest is probably to define a multi-configuration job.

There is no way to turn an existing free-style job into a multi-configuration job, so you will have to make a new job.

  • Choose New job
  • Choose Build new multi-configuration project. Add a name.
  • Under Configuration Matrix, open the "Add axis" drop down.
  • Choose Slaves
  • Check master and the slave
  • Add the SCM information and build step(s)

When the job runs, it runs on both the master and the slave. Jenkins makes sure they build from the same source version.


From the /jenkins/computer url, you can add, remove, and reconfigured "nodes" which are either local or remote "build agents".

The Jobs can then be constrained to run on particular build agents, or follow various rules to select the appropriate build agent out of the available agents.