Quantcast

How to use subversion in hudson.tasks.BuildWrapper.preCheckout

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to use subversion in hudson.tasks.BuildWrapper.preCheckout

Anne Stellingwerf
Hi all,

For a problem we are frequently facing with our svn repositories, I am creating my first Jenkins Plugin. In the preCheckout() of my impl of BuildWrapper, I want to do investigations on what the head revision of 2 different repos are. How can I use the existing Subversion plugin classes to do this (to use proven technology and reduce my own maintenance)?

I already tried to use the SVNClientManager (via SubversionSCM.createSvnClientManager, but that manager does not work for repos; I'd need to check out the repos, which is too much hassle. I do want to use the authentications already stored in the Jenkins instance, so that all configuration is in 1 place.

Any ideas to get around this?

Kind regards,
Anne Stellingwerf 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to use subversion in hudson.tasks.BuildWrapper.preCheckout

Mirko Friedenhagen-3

Hello Anne,

I am not sure whether you may/should reuse other plugins in this way. Except of the API used in the UI part most other stuff is probably changeable between minor releases.

AFAIK Jenkins plugins do not have a notion of sharable code like e.g. Maven plugins where there are in SCM or Release components called Manager which are especially meant for reuse.

Regards Mirko
--
Sent from my phone
http://illegalstateexception.blogspot.com
http://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/

On Apr 7, 2012 2:44 AM, "Anne Stellingwerf" <[hidden email]> wrote:
Hi all,

For a problem we are frequently facing with our svn repositories, I am creating my first Jenkins Plugin. In the preCheckout() of my impl of BuildWrapper, I want to do investigations on what the head revision of 2 different repos are. How can I use the existing Subversion plugin classes to do this (to use proven technology and reduce my own maintenance)?

I already tried to use the SVNClientManager (via SubversionSCM.createSvnClientManager, but that manager does not work for repos; I'd need to check out the repos, which is too much hassle. I do want to use the authentications already stored in the Jenkins instance, so that all configuration is in 1 place.

Any ideas to get around this?

Kind regards,
Anne Stellingwerf 
Loading...