简体   繁体   中英

Use of master and slave in Jenkins

I've created a slave in Jenkins. And I downloaded the slave Java file. When I run that Java file my slave comes online. And I've also selected the particular job in which I've given this slave as a restrict option.

What is the use of this Jenkins slave option?

I also saw that only when my slave is online can I build that job.

One way to think about the "slave" is that it's where all of your requested/scheduled actions occur.

For example, when you tell Jenkins to check out a repository it does a Git clone from the slave. Or when you schedule an "execute shell" task in your job configuration it will run the commands on the slave itself.

Another thing to note is that your slave node typically has all the software packages it needs to build your project. It is also common to have multiple slave nodes that support the various code repositories such as one running Windows for .NET code, one running Linux/windows that supports your Android code, and one for OS X that is used for your iOS code.

Arguably you could install all these packages on your master node and use your master as a slave, but it's not recommended.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM