So in your working version how do you specify the AdditionalCredentials
instance? And how come you don't have the credentialId? I have a feeling
that what you really wanted is just to pass in credentials, not so much
"additionalCredentials":
Assuming that, I'd rewrite your following script:
checkout scm: new hudson.scm.SubversionSCM('http://svn.repo.de/foo/trunk',
'123-123-123-123', '.')
... into this:
checkout scm: [ $class: "SubversionSCM", locations: [ remote:'
http://svn.repo.de/foo/trunk', credentialsId:'123-123-123-123' ] ]
This version relies less on a specific constructor. (I haven't verifieid if
generic SCM step can get the databinding of nested ModuleLocation done like
this, but I believe Jesse implemented this some time ago.)
Right now, the best way to get to snippet like this is to use the snippet
generator, so I need to check if it does that. Given your question, I
assume it didn't.
Beyond that I also think we need more docs (probably auto-generated form
the source code as opposed to manually authored to prevent it from getting
out of sync), something like what Chef does
<https://docs.chef.io/resource_file.html>, so that a simple common case
like this can be readily looked up from examples.
When I write Chef recipes I look at these docs all the time, and the same
for Maven.
2014-12-17 4:09 GMT-08:00 Stefan Lorenz <[email protected]>:
>
> Hi,
>
> I used the wrong syntax in the workflow-plugin
>
> I'm using this now:
>
> checkout scm: new hudson.scm.SubversionSCM('http://svn.repo.de/foo/trunk',
> '123-123-123-123', '.')
>
> It's the wrong/depcated constructor probably but it works now...
>
> thx for your response
>
>
> Am Mittwoch, 17. Dezember 2014 09:53:22 UTC+1 schrieb Jennifer Hofmeister:
>>
>> Hi Stefan,
>>
>>
>>
>> did you add credentials in the checkout step, or only in the Addtional
>> Credentials part? It’s necessary to specify them in both places.
>>
>>
>>
>> If the problem doesn’t go away, maybe https://issues.jenkins-ci.org/
>> browse/JENKINS-22542 can provide some solutions for you.
>>
>>
>>
>> Cheers
>>
>>
>>
>> Jennifer
>>
>>
>>
>> *Von:* [email protected] [mailto:[email protected]] *Im
>> Auftrag von *Stefan Lorenz
>> *Gesendet:* Dienstag, 9. Dezember 2014 23:40
>> *An:* [email protected]
>> *Betreff:* [workflow-plugin] svn credentials problem when running on a
>> remote node
>>
>>
>>
>> Hi,
>>
>>
>>
>> Is it possible to get AdditionalCredentials from the SubversionSCM into a
>> workflow, because I always get this:
>>
>>
>>
>> Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: OPTIONS
>> ...
>>
>> Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: No
>> credential to try. Authentication failed
>>
>>
>>
>>
>>
>> My build step looks like that:
>>
>>
>> checkout scm: [$class: 'SubversionSCM', locations: [new
>> hudson.scm.SubversionSCM.ModuleLocation('http://svn.repo.foo/bar/trunk',
>> ".")], additionalCredentials: [new hudson.scm.SubversionSCM.
>> AdditionalCredentials('<http://svn.repo.foo:80> Foo Subversion
>> Repository', 'svn.repo.foo')]]
>>
>>
>>
>> Can this work?
>> Or is there a example how to handle that?
>>
>>
>> Thx
>> Stefan
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/jenkinsci-users/4aa5bda3-ccd6-4004-8345-
>> a8c7f67e6445%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/4aa5bda3-ccd6-4004-8345-a8c7f67e6445%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/b2888cc4-038a-48c4-bbca-648ccb0c1b96%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/b2888cc4-038a-48c4-bbca-648ccb0c1b96%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Kohsuke Kawaguchi
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAN4CQ4wA8xoTdt%2B5JE-snwhXDc_LwJQFXVVQndO6jCqhTXCX-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.