与詹金斯(Jenkins)的CI:如何强制在奴隶而不是主人身上进行建设? [英] CI with Jenkins: how to force building happen on slaves instead of master?

查看:76
本文介绍了与詹金斯(Jenkins)的CI:如何强制在奴隶而不是主人身上进行建设?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jenkins for CI,我有一个主服务器和两个从属服务器,主服务器正在运行Jenkins,我只希望从属服务器执行实际的构建任务,我可以在任何地方进行配置吗?我知道有一个执行器",如果我在master上将其更改为0,也许master不会构建任何东西,但是有什么适当的方法吗?

I am using Jenkins for CI, I have a master and two slaves, master is running Jenkins and I want only slaves doing the actual building task, is there anywhere I can configure this? I know there is an 'executor', if I change it to 0 on master, probably master won't build anything, but is there any proper way to do this?

推荐答案

您可以使用作业中的限制可以在哪里运行该项目"选项来设置作业的运行位置. 此设置可以与您添加到从站的标签一起使用.

You can set where a job will be run using the "Restrict where this project can be run" option in your job. This setting can be used together with tags you have added to your slaves.

例如,具有标签"Linux-buildserver"并使用该标签的两个从属服务器将在这两个从属服务器上拆分作业. 在作业中将IP地址设置为标签将确保仅使用buildserver/slave.

For example two slaves having the tag "Linux-buildserver" and using that tag will split the job up on those two slaves. Setting the IP-address as a tag in the job will make sure only that buildserver / slave is used.

这篇关于与詹金斯(Jenkins)的CI:如何强制在奴隶而不是主人身上进行建设?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆