Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a specific revision of SVN in Hudson/Jenkins

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.

like image 811
Ricky Avatar asked Feb 24 '10 06:02

Ricky


People also ask

Can we integrate svn with Jenkins?

Now create a Jenkins build job. Select New Item, give the build project a name such as svn-tomcat-demo, select Maven project, and click OK. Under source code management, select Subversion and enter your SVN repository URL and credential. Please download the sample code and check the code into your SVN server.

How can I get previous revision from svn?

Using the latest versions of Subclipse, you can actually view them without using the cmd prompt. On the file, simply right-click => Team => Switch to another branch/tag/revision.

How does Jenkins work with svn?

The Jenkins Subversion plugin uses SvnKit as the subversion client and doesn't require a native client to be available on the host. Setting up a CI server with Jenkins and Subversion is limited to a very minimal installation process: just run the Jenkins WAR and you're done.


2 Answers

(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

like image 45
Balmipour Avatar answered Sep 21 '22 15:09

Balmipour


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
like image 136
Peter Schuetze Avatar answered Sep 21 '22 15:09

Peter Schuetze