Make Mark
Make Mark

Reputation: 3765

Git hosting setup that pulls from developers, rejecting broken commits?

Development teams are often plagued by builds in version control being transiently broken. The entire team's productivity can come to a halt while trying recover from a build broken by one person.

Is there software that would allow hosting Git in a way that prevents breaking builds in version control by not accepting commits that fail to pass tests in the first place? The usage scenario could for example look as follows:

A few notes:

Upvotes: 8

Views: 953

Answers (3)

Brendan
Brendan

Reputation: 418

It's a really good idea. Bamboo supports this quite naturally. Several Bamboo customers as well as teams at Atlassian have this exact methodology setup and working to great effect. Bamboo has event listeners which can tell (without polling) when a commit is pushed to a 'test verfication' repo and then verify it by running the tests before pushing to the stable branch. www.atlassian.com/bamboo

Upvotes: 1

NorthIsUp
NorthIsUp

Reputation: 17877

We use gerrit and hudson. It is what android and Cyanogenmod use as well (along with many others).

Gerrit allows for code review and automatic building of every commit with automatic rejection of those that fail tests.

Hudson runs the tests.

Hudson: http://wiki.hudson-ci.org/display/HUDSON/Designing+pre-tested+commit

Gerrit: http://gerrit.googlecode.com

This system works well with the repo tool to have a large number of small repositories, this will reduce merge conflicts which have to be handled manually via a rebase.

Note: it is quite a bit of work to get up and running if you have a large existing code base, but totally worth it.

Upvotes: 2

Jonathan Holloway
Jonathan Holloway

Reputation: 63714

I think this is more a build server feature that ties into a VCS such as Git. TeamCity does have support for this, but I've not tried it so I can't comment on how good it actually is.

http://www.jetbrains.com/teamcity/features/delayed_commit.html

The Hudson guys have been discussing it for a while, but I've yet to see it in a release.

http://wiki.hudson-ci.org/display/HUDSON/Designing+pre-tested+commit

Upvotes: 2

Related Questions