Run build of Machine A from Machine B using Jenkins Run build of Machine A from Machine B using Jenkins jenkins jenkins

Run build of Machine A from Machine B using Jenkins


Your current setup is good enough to kick off the build remotely from Com-B to Com-A.

Please make sure the jenkins server deployed on Com-B has properly configured as Master and other nodes (ex : Com-A) as slaves.

To ensure the configurations, please follow the steps given below :

  • Step 1: Go to Manage Jenkins page and select Manage Nodes link

    Manage Jenkins

  • Step 2: On Manage Node page, you can see a list of nodes if already configured. Else there will be only one node named as Master by default which represents the host.

Manage Nodes

  • Step 3: To add new Node, give a name (ex: selenium-slave1) and select Dump Slave option to add a node as customized slave.

Add New Node

  • Step 4(a): After adding the node, configure the node as shown below.

    Configure New Node

  • Step 4(b): Make sure while setting the Launch Method field, Launch slave agents on Unix machines via ssh has been selected (this will communicate via ssh between master and slave nodes).

enter image description here

  • Step 4(c): configure advanced fields which are highlighted as per your settings and click save.

Advance Configuration of new Node

  • Step 5: Finally a new node has been added as slave and configured successfully.

Node Configuration Successful

  • Step 6(a): Now Configure a new Job to schedule it whenever it need to be run.

Add a New Job

  • Step 6(b): Add a new maven job since your project has been configured using maven.

enter image description here

Note : Will add the job config soon.


You can make Com-A a slave machine in jenkins. Com-B will become master and mark the build to always run from Com-A node.

Refer https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines


First of all, u don't need to install all thing in COM B.

Connect with COM A with ssh(secure shell) command and than execute ur project using shell or bash script. In jenkins, u will found all build step under Build option.

i use the below command to run my project using shell script:

ssh -l user comAIpaddress(ex. 192.192.192.192) sh SciptLocationInComA.shell

this command first connect with another machine and than execute the shell script to run the project.

Run a java project using shell or bash script is quite easy..... :)