事项背景:
原本已经在测试服务器上搭建好了jenkins服务,做了分布式构建
因为项目调整,需要重新安排测试执行机
这需要调整jenkins的job的设置
其中一项就是“标签表达式”(Label Expression)
这是执行机的别名,可以在配置节点(Node)的时候地方修改:
配置好以后,进入我们的Job,填写在此处:
以后服务器就会据此设置,来调用执行机完成自动化构建。
设置标签的原因:为了避免给机器改名之后,job的构建机器也需要改名。
为了彻底了解这里的用法,提供了关于用法的译文
1.Restrict where this project can be run
限定该项目可以运行的节点(执行的机器)
By default, builds of this project may be executed on any build agents that are available and configured to accept new builds.
默认的,这个项目的构建过程可能在任意一台具备执行条件的执行机上面。
When this option is checked, you have the possibility to ensure that builds of this project only occur on a certain agent, or set of agents.
当这个选项被勾选,你将