Hi David,
Thanks for the reply.
When someone enter SVN credentials in the screen [1] you mentioned
that will end up in [2].
Correct me if I'm wrong, but as far as I understood anything that's
stored there will be
for entire Jenkins (not exactly per job).

However, by playing around with jenkins for a while I figured out that
screen available at [3] actually allows User
to set credentials for a specific job ( credentials given will be
stored in job directory).
However, I'm looking for a elegant way of doing this programmatically.

So far what I have managed is to do a HTTP POST to [4] with relevant
parameters and check for HTTP response (and Location header) for
success. So what do u guys think? would this be a clean approach ?


[1] http://<JENKINS_SERVER>/scm/SubversionSCM/enterCredential
[2] <JENKINS_HOME>/hudson.scm.SubversionSCM.xml
[3] 
<JENKINS_SERVER>/job/<JOB_NAME>/descriptorByName/hudson.scm.SubversionSCM/enterCredential
[4]  
<JENKINS_SERVER>/job/<JOB_NAME>/descriptorByName/hudson.scm.SubversionSCM/postCredential

Regards
Ramith (LSF)

On Mon, Aug 27, 2012 at 7:20 PM, Qazwart <qazw...@gmail.com> wrote:
> Jenkins can store subversion credentials per job, or under the 
> $HOME.subversion/auth directory.
>
> If you need a different credential for a specific job, go to that job's 
> configuration. Click on the help button by where you enter the Subversion 
> URL. Read the help. There's a link that will allow you to enter a different 
> credential.
>
> --
> David Weintraub
> da...@weintraub.name
>
> On Aug 27, 2012, at 4:33 AM, Ramith Jayasinghe <ramithonl...@gmail.com> wrote:
>
>> Hi Guys,
>>  I trying to figure out how to pass credentials (user name and password) for 
>> svn repository in the job configuration xml.
>> I checked the code base [1] and this feature ( per job credential) seems to 
>> be available.
>> So has anyone tried this before?
>> Could someone share a sample Xml fragment to do this?
>>
>>
>> [1] PerJobCredentialStore.java
>>
>> Regards
>> Ramith (LSF)
>>



-- 
Ɣampire Łestat™
[Coolest Guy on Earth™]

Reply via email to