Jenkins / Hudson构建具有优先级的所有分支 [英] Jenkins/Hudson Build All Branches With Prioritization

查看:635
本文介绍了Jenkins / Hudson构建具有优先级的所有分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何配置Jenkins构建所有分支,同时给予主分支最高优先级?

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.

这不行,因为所有的分支机构显然会建立所有分支,包括master。

This doesn't work since all branches obviously builds all branches including master.

推荐答案

Git插件有BuildChooser扩展点为这种目的。 Git插件告诉你可能想要构建的所有有趣的修订版本(以前没有建立的新提示提交),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.

因此,如果你的BuildChooser总是喜欢构建主语,你会得到所需的语义。

So if your BuildChooser always prefer to build the mater, you get the desired semantics.

这篇关于Jenkins / Hudson构建具有优先级的所有分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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