问题
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.
回答1:
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.
回答2:
Christopher solved my question by writing the functionality.
Give this guy some karma.
来源:https://stackoverflow.com/questions/7518392/jenkins-hudson-build-all-branches-with-prioritization