0

I am reading up on continuous delivery, or the philosophy/practice whereby commits to source control directories trigger CI builds, and if the build fails then all development freezes until the committer fixes the problem, re-commits and fixes the build. I really, really like this mentality.

We are using Jenkins for our CI server and SVN for SCM (these are company-dictated "standards" technologies, so there is no leeway with the choice of technology here).

I'm wondering how I could achieve this. I have installed both the Subversion Plugin and the Tagging Subversion Plugin for Jenkins, but don't see where I can set up a SVN trigger to kick off a build, and the documentation for both these plugins makes no indication that they even have this capability.

Even once I figure that out, I need a way to freeze SVN in the event of a failed build (so that other developers don't keep checking in code and re-triggering the failed build).

Am I asking for too much here? Or am I just missing the right plugin? Thanks in advance!

1
  • Was any of the answers helpful? Commented Apr 17, 2012 at 14:20

2 Answers 2

1

Subversion plugin contains inline help on how to use it. Go to job configuration -> source code management -> check off subversion. You'll see form entries for Subversion Plugin, click on ? marks near the form entries.

Freezing the build: I do not think you should rely on hard 'locks' (such as SVN triggers that prevent commits). With Email-Ext Plugin you can configure to send e-mails on various kinds of build events. For example, Jenkins can e-mail to 'culprits' (people, whose commits broke the build). In my experience, someone should check the build system from time to time to check who broke the build and 'ping' them.

Sign up to request clarification or add additional context in comments.

Comments

0

I need a way to freeze SVN in the event of a failed build

While I consider it as bad practice, but... tastes can differ. Bullet-proof method of preventing commit is

The pre-commit hook is run just before a commit transaction is promoted to a new revision. Typically, this hook is used to protect against commits that are disallowed due to content or location (e.g., your site might require that all commits to a certain branch include a ticket number from the bug tracker, or that the incoming log message is nonempty).

If the pre-commit hook program returns a nonzero exit value, the commit is aborted, the commit transaction is removed, and anything printed to stderr is marshalled back to the client.

  • which, with interaction with Jenkins, returns non-zero exit-code and descriptive text, while builds failed, and zero on successful build

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.