Run build of Machine A from Machine B using Jenkins

前端 未结 3 1935
轻奢々
轻奢々 2021-01-02 05:02

I have 2 computers. Com-A, Com-B.

I have build automation functional script using selenium webdriver,Testng and maven on Com-A.

Com-A has installed everythi

相关标签:
3条回答
  • 2021-01-02 05:19

    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..... :)

    0 讨论(0)
  • 2021-01-02 05:26

    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

    0 讨论(0)
  • 2021-01-02 05:32

    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

    • 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.

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

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

    • 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).

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

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

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

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

    Note : Will add the job config soon.

    0 讨论(0)
提交回复
热议问题