I'm setting up a system where we have the following workflow:
1) User pushes change in git to gerrit with the JIRA issue number in the commit message
2) User submits change from gerrit
3) Build automatically kicked off from Jenkins if not already running, otherwise it's told to poll (so multiple commits can be collected into a single build if they are submitted whilst another build was in progress)
4) When a build starts it creates a git tag and pushes that into gerrit (tag is then of the form $branch_$buildnumber) currently $buildnumber is just a data and time.
5) Overnight the latest build is picked up for round 1 testing if it passes a tag is added (tag is of the form $branch_$buildnumber_r1)
6) At some point during a day a build that passed round 1 testing is picked up for round 2 testing if it passes a tag is added ($branch_$buildnumber_r2)
7) After a few weeks/months a build is released and is given a tag matching the release number eg v1.0.0.1
So we basically have levels of tags depicting confidence levels in builds.
This all seems to work fine, the problem is that people want an easy way to see what builds a change went into. Looking at an issue it shows what tags the commits are in, the problem is that there are just too many of them. Most of the time people only care about the first build that it goes into or the first one of each level.
A crude solution I've come up with is that when it adds a tag it renames any tags at a lower level to have a prefix that JIRA then filters out (basically archiving the tag). So you could have the following list of tags:
b1_120202003629
b1_120101150059
b1_120101142405
b1_120101123002
b1_created
The build overnight build picks up b1_120101150059 and it passes so we have:
b1_120202003629
__b1_120101150059 , b1_120101150059_r1
__b1_120101142405
__b1_120101123002
b1_created
Now when looking at an issue it will only show the tags:
b1_120202003629
b1_120101150059_r1
b1_created
The problem with this is:
1) Even with cleaning up the tags there will still be a lot of active tags on the old issues (but maybe people care less about seeing the information quickly on an old issue so having a large list isn't too much of an issue )
2) People will have the old tags locally, they can't push them to gerrit (as they don't have permissions for that) so they can't reincarnate a tag, but it still looks messy and could be confusing.
3) Is the huge number of tags going to cause performance problems at any point?
So is there some better way that I'm missing?
Currently using plugins:
Git Integration for JIRA
JIRA Gerrit plugin