Quantcast
Channel: Kushal's Java Blog | Software Engineering Blog » Continuous Integration - Kushal's Java Blog | Software Engineering Blog
Viewing all articles
Browse latest Browse all 4

How to build a specific SVN (Subversion) revision in Hudson and Jenkins

$
0
0

Think about a scenario where you are working on some functionality of a project and committed a partially completed functionality to the subversion (probably because you were told Commit Early, Commit Often for continuous integration if you are working on an agile team). Now, you don’t want to, however, build and deploy the latest code to your test environment because some of the features are not ready yet. You are still working on those. In that case, if you need to do a build, you might wonder how to run a build from old and probably stable revision in your repository.

This is exactly what I am going to show you here.

I am hoping you are already using a subversion plugin to checkout the code, if not the plugin is available for Hudson at the following URL. Jenkins also has similar plugin.

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

Once you have installed this plugin, go to ‘Configure’ your Hudson Job and scroll down to Source Code Management section. Underneath subversion in that section (see the picture below), there is a field where you specify the repository URL. If you provide the plain URL to your subversion branch/trunk/tag, it will always pull the latest code from that branch/trunk/tag.

But you want to specify a specific revision,then you can append @revision at the end of the url. Where ‘revision‘ is your actual revision number.

how_to_build_specific_revision_in_hudson_sanjaaldotcom

For a fictitious svn url below, Hudson will always pull the latest code from the forexpro branch.

https://svn.icodejava.com/branches/forexpro

If you just need a revision 234, then the url you specify here would be

https://svn.icodejava.com/branches/forexpro@234

There are also other parameters that you can pash to this URL.e.g.

https://svn.icodejava.com/branches/forexpro@HEAD

The above url builds with latest revision in the repository.

https://svn.icodejava.com/branches/forexpro@BASE

The above url builds with the the revision number of an item in a working copy. If the item has been locally modified, this refers to the way the item appears without those local modifications.

https://svn.icodejava.com/branches/forexpro@COMMITTED

The above url builds with the most recent revision prior to, or equal to, BASE, in which an item changed.

https://svn.icodejava.com/branches/forexpro@PREV


The URL above builds with the revision immediately before the last revision in which an item changed. Technically, this boils down to COMMITTED-1.

Share


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images