Original: http://www.cnblogs.com/itech/archive/2011/11/09/2243025.html
Reference:
Https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines
A new slave is created
Note that slave in Jenkins is called a note. So slave and node in the following article refer to one thing.
1) under Manage jenkins-->manage Nodes-->new node: Enter node Name, and select dumb slave as the type of slave, then OK.
2) on the Slave configuration page, enter the following:
The number of *executors, 1 or more;
* Enter a directory on slave, such as C:\jenkins;
*usage Select: Leave this machine fortied jobs only;
*lunch method Selection: Launch slave agents via Java Web Start ;
* Avaliablitiy Select:Keep This slave online as much as possible;
* then save;
3) Log in to Jenkins master on the machine where slave is located, and enter Manage jenkins-->manage nodes--> new Note, click Launch, then install Slave as service as follows:
4) After successful installation, the following is displayed:
II Run job on slave
Add a label to the above slave, which indicates the usefulness of this slave, and at the same time select leave this to tied jobs only:
The job changes in the Jenkins build Javahelloworld are as follows:
Select restrict where this project can be run and enter a label for note (slave).
Also note that the SVN address is correct, and Jenkins will prompt you for the SVN username and password.
At this point the job will run on the machine where the slave is located, and of course the required environment for build is configured on the slave well, run as follows:
Note: The Jenkins slave does not take effect immediately for changes to the slave system environment variables and requires a restart of the Jenkins slave service. For example, I installed Ant on slave, I still can't find it after I set it to path, I need restart Jenkins slave service.
For more information:
Https://wiki.jenkins-ci.org/display/JENKINS/Distributed+buildshttp://community.jboss.org/wiki/HudsonWindowsSlavesSetup
The configuration of Jenkins's Windows slave