Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

force stable trunk/master branch

Our development departments grows and I want to force a stable master/trunk.

Up to now every developer can commit into the master/trunk. In future developers should commit into a staging area, and if all tests pass the code gets moved to the trunk automatically. If the test fails, the developer gets a mail with the failed tests.

We have several repositories: One for the core product, several plugins and a repository for every customer.

Up to now we run SVN and git, but switching all repos to git could be done, if necessary.

Which software could help us to get this done?

There a some articles on the web which explain how to use gerrit and jenkins to force a stable branch.

I am unsure if I need both, or if it is better to use something else.

Environment: We are 10 developers, and use python and django.

Question: Which tool can help me to force a stable master branch?

Update

I was on holiday, and now the bounty has expired. I am sorry. Thank you for your answers.

like image 295
guettli Avatar asked Dec 07 '25 00:12

guettli


1 Answers

Question: Which tool can help me to force a stable master branch?

Having been researching this particular aspect of CI quasi-pathologically since our ~20 person PHP/ZF1-based dev team made the switch from SVN to Git over the winter (and I became the de-facto git mess-fixer), I can't help but share my experience with this particular aspect of continuous integration.

While obviously, having a "critical mass of unit tests running" in combination with a slew of conditionally parameterized Jenkins jobs, triggering infinitely more conditionally parameterized jobs, covering every imaginable circumstance would (perhaps) be the best and most proper way to move towards a Continuous Integration/Delivery/Deployment model, the meatspace resources required for such a migration are not insignificant.

Some questions:

  • Does your team have some kind of VCS workflow or, minimally, rules defined?

  • What percentage would you say, roughly, of your codebase is under some kind of behavioral (eg. selenium), functional or unit testing?

  • Does your team ( / senior devs ) actually have the time / interest to get the most out of gerrit's peer-based code review functionality?

  • On average, how many times do you deploy to production in any given day / week / month?

If the answers to more than one of these questions are 'no', 'none', or 'very little/few', then I'd perhaps consider investing in some whiteboard time to think through your team's general workflow before throwing Jenkins into the mix.

Also, git-hooks. Seriously.

However, if you're super keen on having a CI/Jenkins server, or you have all those basics covered already, then I'd point you to this truly remarkable gem of a blog post:

  • http://twasink.net/2011/09/16/making-parallel-branches-meet-regularly-with-git-and-jenkins/

And it's equally savvy cousin:

  • http://twasink.net/2011/09/20/git-feature-branches-and-jenkins-or-how-i-learned-to-stop-worrying-about-broken-builds/

Oh, and of course, the very necessary devopsreactions tumblr.

like image 51
Alex Kestner Avatar answered Dec 08 '25 23:12

Alex Kestner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!