views:

335

answers:

4

I have a job in Hudson with Subversion as Source Code Management.
But I do not want always to update working copy to HEAD revision.
I need to have ability to choose SVN revision during start of this job.
It is possible to parameterize build with revision number.
But as far as I can see I cannot use parameter in repository URL.
I can only hardcode revision.
Is it true?

A: 

Don't give a URL in Subversion field of Hudson. Just use a single command svn co -rRevision..before the real call of the build script. URL where Revision is defined as a parameter.

khmarbaise
+1  A: 

Yes, that's the way it works. For more information:

In JIRA see: http://issues.hudson-ci.org/browse/HUDSON-4412

Also, see: http://stackoverflow.com/questions/1863949/can-a-parameterized-hudson-build-override-the-svn-revision

William Leara
+1  A: 

The Subversion Release Manager plugin might do what you want.

This plugin allows you to set up a job in Hudson for building specific revisions of a project.

Hudson-3207 is the associated Hudson bug.

Dave Bacher
A: 

You can declare a String parameter REVISION and then use http://host/path@${REVISION} as repository URL. When starting a build you will then be asked the revision number. You can give a specific revision or HEAD to build the latest.

Tom