Strider-CD/strider — pull request #320 by microadam (2013-12-20 21:10:19+00:00)
Title: Advanced branch management - with wildcards!

So this allows for much more advanced branch management then we had previously.

It adds this panel to the project settings page:

https://www.dropbox.com/s/ofxmo0pcj75aoyr/Screenshot%202013-12-20%2020.54.32.png

All you need to do is enter the names of the branches that you are interested in having configs for and they will then appear in the normal branch drop down:

https://www.dropbox.com/s/f1pq4t52yr2bac3/Screenshot%202013-12-20%2020.57.52.png

The advantage of this mechanism over previous is that if we have a project with a lot of branches, that drop down doesn't get completely full of potentially useless branches that we aren't really interested in.

The other, greater advantage, is the wildcard support that comes with this. We now have the ability to specify a branch such as 'feature/*' or '*-test' or any other branch naming structures that you have. Branches that match these patterns will then follow the configured branch settings. i.e 'feature/my-great-feature' and 'feature/my-awesome-other-feature' can all be grouped into the same branch configuration.

By default, when a project is created, the branches that are automatically populated for you are 'master' and '*'. The '*' means that anything that isn't master will use that configuration (which defaults to mirror master) so this gives exactly the same behaviour as we currently have now in that every branch is watched and a build is run when new branches are pushed. This behaviour will also be observed on all currently configured projects. I have taken advantage of the schema version update tool to make sure that every project has a '*' branch associated with it.

One thing to note (all detailed on within the branch management pane as you can see from the first screenshot) is that the order that branches appear in the branch list is important. If you have a wildcard branch such as '*' first, then this will match every single branch and ignore all your other configured branches. Therefore it is best to have specific branches higher up in the list and your '*' branch at the end as a catch all. Because of this ordering necessity, you can reorder the branch list must like you can the enabled plugins.

I think that covers everything! Let me know your thoughts on this as its quite a large change or if you have any questions.