Hi all,
Anyone has experience on this? I just want to block bad commit
Bad commits on a trunk aren't the end of the world - and one of the points of
keeping everything in a version control system is so you can learn from previous
mistakes. If you just let jenkins build frequently after trunk commits and
email the development group on failed builds it will be fixed quickly and your
developers will learn to run a test build before committing. And with
continuous builds happening on the trunk, you'll probably want to copy to
branches as your work approaches new stable release points for final changes and
testing as the trunk development moves on.
--
Les Mikesell
lesmi...@gmail.com
I understand you. One of our project is like this. However the project owner doesn't want commit which break build in repository
No one does. But, this is not the end of the world. With Subversion,
you can easily revert bad commits. In fact, you can use Jenkins to run
tests, do code coverage, and check syntax styles.
Developers get very embarrassed when they cause a build to fail, and
everyone on their team (and all the team leads) get an email stating
this. Jenkins makes it very obvious when someone messes up. I've been
in projects using Jenkins for years that never had a bad build caused
by a developer commit.
To really ensure that developers don't break builds, use the Jenkins
Continuous Integration Game. It scores builds by how unit testing and
the build comes out. Break a unit test, and you lose a point. Break a
build, and you lose 10 points. Fix a unit test, and you get a point.
Plus, you get a point for each good build. Developers are very proud
of their position on the leader board.
--
David Weintraub
qaz...@gmail.com
This would be easier to arrange with a distributed VC like git where a
person in charge of the 'master' repo can selectively pull approved
changes from developer's copies. With a centralized VC like subversion,
you either accept that the trunk will sometimes have flaws, do all
development on 'feature' branches that are merged back to the trunk when
complete, or don't give commit access to anyone you don't trust to do a
test build before committing (and with concurrent development you can
still miss).
--
Les Mikesell
lesmi...@gmail.com
Thanks,however it's difficuclt to switch to git so far,not technical reason.
There should be lots of subversion users who play with Jenkins,I still
want to get some clues on pre-commit build
The simplest work around for this if you have to use svn is to have two branches, a staging branch and a reviewed branch, Hudson builds the staging branch, if it passes somebody then copies the changes into the master branch (and another Hudson job builds this to make sure it really is ok).
Thomas
I am very interested at your first suggestion-submit patch to jenkins.
Just a question here:how do i apply patch meanwhile the patch will not commit into repository
maybe it would be a worthwhile addition to jenkins?
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
I haven't tried it myself but the description looks like it could be used to implement pretested commit, especially when reading under the title "Automatic integration"
-- Sami