Jenkins-连接新的从站时运行作业 [英] Jenkins - Run job when new slave connects
问题描述
我有一个Jenkins安装程序,它使用SWARM连接新的奴隶. 我在AWS中启动了新实例,它们使用SWARM Client连接到Jenkins主服务器并将其注册为从服务器.
I have a Jenkins installation uses SWARM to connect new slaves. I bring up new instances in AWS and they use the SWARM Client to connect to the Jenkins master and register themselves as slaves.
是否可以让Jenkins主服务器检测何时添加了新的从服务器,并开始在该从服务器上运行一些初始化"作业?
Is it possible to have the Jenkins Master detect when a new slave is added and start to run some "init" job on that slave?
谢谢
推荐答案
We use the Slave Setup Plugin to mount a network drive and copy some files from the master whenever a slave connects.
如果您希望在从属(或某些从属)连接时运行某些Jenkins作业,则可以尝试启动触发器插件.
If you want to run certain Jenkins jobs whenever a slave (or certain slave) connects, you could try the Startup Trigger Plugin.
这篇关于Jenkins-连接新的从站时运行作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!