Improving the Literate/Multi-branch UI

Written by: Stephen Connolly
2 min read

Version 0.1-beta-1 of the literate builds plugin has a less than stellar UI for adding branch sources. I've fixed that.

Here is how the old UI looked

You would add a Branch Source, and have drop downs to select the source and then drop downs to select the property strategy… (and there was a bug where the property strategy could not be effectively configured until after you saved the configuration… but that could have been fixed)

This is not the user experience I want.

So I did some hacking, and this is now what you will get in the soon to be released 0.1-beta-2 version of the plugin:

You get a drop down for adding the source that lets you pre-select the source type...

We have bypassed the bug that prevented the property strategies from being configurable, and instead of a list of checkboxes showing all potential properties, we have a good old hetero-list that only shows the branch properties configured for. With a new branch property strategy, we can now have a configuration something like this:

Now this is starting to show why it is important to keep information scoped with the relevance of the information.

The source control should never store details of how many build records to keep. What if somebody made a mistake by merging back to controller and merges the only keep 5 builds onto the controller branch with 25 builds then getting deleted? That is information that source control should never keep … (or at least the source control of the job being built) Similarly the fact that some branches are Untrusted should not be indicated by a file in source control… a hacker can just add that file to a pull request and then their pull request's branch is trusted!

Jenkins needs to know this information, so we scope that information with Jenkins. This does mean that the UI can grow, but it only grows when you need it to… at least that is my plan!

—Stephen Connolly

Stephen Connolly has over 20 years experience in software development. He is involved in a number of open source projects, including Jenkins . Stephen was one of the first non-Sun committers to the Jenkins project and developed the weather icons. Stephen lives in Dublin, Ireland - where the weather icons are particularly useful. Follow Stephen on Twitter and on his blog .

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.