20

Background:

We use NAnt as our building tool.

Question:

How can I tell Hudson to build a specific revision in SVN, instead of the latest one by default?

Thanks.

Peter Schuetze
  • 16,185
  • 4
  • 44
  • 58
Ricky
  • 34,377
  • 39
  • 91
  • 131
  • 6
    any one try this? http://wiki.hudson-ci.org/display/HUDSON/Subversion+Release+Manager – Ricky Feb 24 '10 at 07:15

4 Answers4

41

You configure the svn location including the revision number

<SVN_URL>@revision

Instead of putting the revision number hard coded in there you can use a parameter for the hudson job

<SVN_URL>@$param
Peter Schuetze
  • 16,185
  • 4
  • 44
  • 58
8

(Lacking rep to comment, so I answer instead)

Peter answer's works well !

The syntax wasn't very clear to me. The solution was... reading Jenkins contextual help ! As simple as this !

The final syntax I used for my repo URL was this one: http://mySVNdomain.com/svn/myREPOname/trunk@414 where 414 was, of course, the revision I needed.

Don't miss the possibility of using @$param if you need something dynamic

Balmipour
  • 2,985
  • 1
  • 24
  • 28
7

Tag the revision, give Hudson the tag url

Leon van der Walt
  • 997
  • 12
  • 18
  • Using a tag didn't work for me with Hudson v1.355. I tried tagging a rev and using xxx/tags/rev instead of xxx/trunk in the "Repository URL" setting. I also tried the @rrr suffix against the trunk -- this started checking out the trunk as well as ALL the tags and branches (before I killed it). – MykennaC Mar 28 '13 at 15:52
5

This is a plugin for Hudson that works really well. It displays a list of revisions and allows you to select one to build.

http://wiki.hudson-ci.org/display/HUDSON/Subversion+Release+Manager

BLeB
  • 1,716
  • 17
  • 24