Re: accessing VCS credentials from inside a Builder

2012-11-02 Thread Ivan Kalinin
Hi there!

What particularly are you trying to accomplish?
To get SVN credentials to use with the SVNKit, you can try to do as follows:

hudson.scm.SubversionSCM.DescriptorImpl descriptor = 
(hudson.scm.SubversionSCM.DescriptorImpl) 
Jenkins.getInstance().getDescriptor(hudson.scm.SubversionSCM.class);
ISVNAuthenticationProvider authenticationProvider = 
descriptor.createAuthenticationProvider(build.getProject());


And use the authenticationProvider with SVNKit stuff.

On Thursday, November 1, 2012 1:35:15 PM UTC+4, Michael Hüttermann wrote:

 Hello, 

 in a Builder, how can I access the Subversion credentials that are used to 
 access the Subversion repository for checkout of code? 


 Thank you. 


 Best regards 
 Michael 




Re: accessing VCS credentials from inside a Builder

2012-11-02 Thread domi
currently they don't, but I think these plugins should provide there 
credentials via the CredentialsProvider Interface of the credentials plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin
/Domi

On 01.11.2012, at 10:35, Michael Hüttermann mich...@huettermann.net wrote:

 Hello,
 
 in a Builder, how can I access the Subversion credentials that are used to
 access the Subversion repository for checkout of code?
 
 
 Thank you.
 
 
 Best regards
 Michael
 
 



Re: accessing VCS credentials from inside a Builder

2012-11-02 Thread Stephen Connolly
Yes that is what I would see as a plan. One reason I have not been dogmatic
and rushed a load of pull requests is that it is important to get the
credential type right...

Take ssh credentials... These come in two forms: user/pass and
user/key(/passphrase)

Now git credentials can be: ssh credentials or http user/pass credentials

Svn credentials can be: ssh or straight user/pass.

There is the issue of scoping where a credential is valid.

We need to iron out the basic credential interfaces before pushing this on
everyone... I am starting slow with ssh as it is a good initial point
(sufficiently complex but not overly so)

On Friday, 2 November 2012, domi wrote:

 currently they don't, but I think these plugins should provide there
 credentials via the CredentialsProvider Interface of the credentials plugin:
 https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin
 /Domi

 On 01.11.2012, at 10:35, Michael Hüttermann 
 mich...@huettermann.netjavascript:;
 wrote:

  Hello,
 
  in a Builder, how can I access the Subversion credentials that are used
 to
  access the Subversion repository for checkout of code?
 
 
  Thank you.
 
 
  Best regards
  Michael
 
 




accessing VCS credentials from inside a Builder

2012-11-01 Thread Michael Hüttermann
Hello,

in a Builder, how can I access the Subversion credentials that are used to
access the Subversion repository for checkout of code?


Thank you.


Best regards
Michael