在 Hudson/Jenkins 中使用特定的构建执行器进行发布
我使用 Jenkins 和 Phing 来进行构建。我有一个主要的构建执行器(主)和一些其他构建执行器(从)。主人的建造速度比奴隶慢得多。然而,master 是唯一能够进行发布版本的执行者。
我的问题是,如何才能在从站/主站上构建非发布版本,并仅针对主站构建发布版本?
目前,我手动更改 Jenkins 中的项目配置,限制哪个执行器可以构建项目。我经常忘记在发布时更改此设置,因此希望避免每次都更改项目配置。
I'm using Jenkins with Phing to make builds. I have one main build executor (master) and a few other build executors (slaves). Master is much slower than the slaves at building. However, master is the only executor which is able to make release builds.
My question is, how can I get non-release builds to build on the slaves/master and release builds to build only against the master?
Currently I manually change the project config in Jenkins restricting which executor can build the project. I often forget to change this when releasing and so want to avoid having to change the project config every time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您最好的选择是创建两个作业,一个用于正常开发构建,另一个用于发布构建。
您还可以尝试创建一个参数化构建,其中变量的值是运行构建的从属 - 我不确定 hudson 是否允许您将变量放入“限制可以运行此项目的位置”框中。
Your best option is to create two jobs, one for normal development builds, and the other for release builds.
You could also try creating a parameterised build, where the value of the variable is the slave to run the build on - I am not sure if hudson would allow you to put a variable in the "restrict where this project can be run" box though.