View list of builds organised by branch?

44 views
Skip to first unread message

seanh

unread,
Mar 27, 2012, 10:49:44 AM3/27/12
to jenkins...@googlegroups.com
Hey, I've setup a Jenkins job for our Python app with the Git and
GitHub plugins. Whenever someone pushes a new commit to any branch of
our GitHub project, Jenkins checks out that commit and runs a script
which runs our unit tests using nose, and if you view the build in
Jenkins you can see a nice JUnit report of which tests failed. Great!

But the problem is that the Jenkins web interface for the job just
presents a list of all builds in chronological order.

What we really want is to see a list of all branches that Jenkins has
built, with the most recently built branches at the top, and for each
branch a list of links to all the builds for that branch.

As a developer, when you visit the Jenkins page for our job, the
question you have in mind is: did all the tests pass for the latest
commit on my branch? With the default interface you'd have to click on
build after build until you find the latest one corresponding to your
branch.

Is there a way to get the kind of view we want in Jenkins?

Thanks

Vincent Latombe

unread,
Mar 27, 2012, 11:16:11 AM3/27/12
to jenkins...@googlegroups.com
Hello,

that's a good idea, I guess it would require an alternative view of the build history that would 'group' the builds by branch. This is SCM-specific, as the branch information is part of Git Data (and not all SCM support building several branches on the same job).

I guess the build history layout could be extracted as an extension point, then a plugin could provide additional views depending on the needs.

Vincent


2012/3/27 seanh <snh...@gmail.com>

seanh

unread,
Mar 27, 2012, 12:16:11 PM3/27/12
to jenkins...@googlegroups.com
On Tue, Mar 27, 2012 at 05:16:11PM +0200, Vincent Latombe wrote:
> Hello,
>
> that's a good idea, I guess it would require an alternative view of the
> build history that would 'group' the builds by branch.

Yes, exactly. And sort the groups by time of latest build, so that
recently built branches appear near the top of the page.

seanh

unread,
Mar 28, 2012, 6:40:47 AM3/28/12
to jenkins...@googlegroups.com
> > Hello,
> >
> > that's a good idea, I guess it would require an alternative view of the
> > build history that would 'group' the builds by branch.
>
> Yes, exactly. And sort the groups by time of latest build, so that
> recently built branches appear near the top of the page.

I'm guessing nothing exists to do this already. Would it be possible to
write a Jenkins plugin to do this? Or does it require an extension point
that doesn't exist yet? Any pointers? Thanks

Todd Greer

unread,
Mar 28, 2012, 4:35:38 PM3/28/12
to jenkins...@googlegroups.com
seanh said:

While your idea is better, a stopgap solution would be to send a build notification email to the user that triggered the build (and/or the users that committed on that branch). The email would include a link to the specific build, and could be customized to include whatever other information you want (such as what tests passed).

Jminne

unread,
Mar 29, 2012, 5:02:12 PM3/29/12
to jenkins...@googlegroups.com
One stopgap solution:  Have the description of the particular build run indicate the branch. 
You can use the build-description plugin to look for a regex and set the description.
It's not great, but it avoids that first click to see which branch built. 

I don't have much Git experience, so there might be a better way.

seanh

unread,
Apr 3, 2012, 6:01:19 AM4/3/12
to jenkins...@googlegroups.com
Thanks for the suggestions. If I can get the build-description to put
the git branch name in the build description, that would be good enough.
It's not particularly pretty, but it would at least make it quick to
find the recent builds of the branch you're interested in.

Jon Schewe

unread,
Apr 23, 2012, 9:14:34 AM4/23/12
to jenkins...@googlegroups.com
Has anyone figured out how to get the branch name into the email that gets sent out? From this email thread I've managed to get the branch name into the job description, which is great. However it'd be even better if the email to my developers would have the branch that was build.

Thanks. 



--
Jon Schewe | http://mtu.net/~jpschewe


Reply all
Reply to author
Forward
0 new messages