Jenkins/Hudson 按优先级构建所有分支
如何配置 Jenkins 构建所有分支,同时给予 master 分支最高优先级?
我的第一个想法是创建两个作业,一个配置为构建所有分支,另一个配置为仅构建 master,然后使用作业优先级插件提前配置 master。
这是行不通的,因为所有分支显然都会构建包括 master 在内的所有分支。
How do I configure Jenkins to build all branches while giving the master branch the highest priority?
My first idea was to create two jobs with one configured to build all branches and the other to just build master, then using the job priority plugin to configure master ahead.
This doesn't work since all branches obviously builds all branches including master.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Git 插件具有用于此类目的的 BuildChooser 扩展点。 Git 插件告诉您可能想要构建的所有有趣的修订(以前未构建的新提示提交),并且 BuildChooser 可以决定构建哪个修订。
因此,如果您的 BuildChooser 总是更喜欢构建母体,您将获得所需的语义。
Git plugin has the BuildChooser extension point for this kind of purposes. Git plugin tells you all the interesting revisions that you might want to build (new tip commits that haven't been built before), and BuildChooser gets to decide which revision gets built.
So if your BuildChooser always prefer to build the mater, you get the desired semantics.
Christopher 通过 编写功能。
给这个家伙一些业力。
Christopher solved my question by writing the functionality.
Give this guy some karma.