On Monday 8 August 2016, Rafael Rezende <[email protected]> wrote:

> I'm developing a plugin that depends on the Team Concert plugin
> <https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Plugin>. *TC
> plugin* has a Credentials field, used to connect to the Team Concert
> server.
> My plugin -- as a Build Step -- should reconnect to the server using the
> same credentials, but I would like to avoid the user having to select his
> credentials twice: first in the SCM configuration, then in the Build Step.
>
>
> The Team Concert plugin does not provide any environment variable to help
> me with that. No user ID, no credentials hash...
>
> Is there any way to reuse the SCM credentials? Or is that simply forbidden
> because of security concerns?
>

So questions:

- is there any use case where a user may actually want to use different
credentials in the build step than in the checkout?

- are you writing a pipeline capable build step or one specifically
tailored for use in old-style jobs only?

- are there use cases where a user may want to use eg the multi-scm and
check out more than one perhaps even with divergent credentials?

If the answers are all yes, then you probably need to just accept that it
is a config option.

If the answers are all no, then you can use run.getParent().getScm() and
borrow the credentials directly... But in doing this you prevent all three
use cases I hinted at with my questions

> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','jenkinsci-dev%[email protected]');>
> .
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/02375c1a-91a1-46b9-92fc-9198861946a1%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/02375c1a-91a1-46b9-92fc-9198861946a1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Sent from my phone

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" 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-dev/CA%2BnPnMywp8EknyW0xKycj3rhkM0SXtk%3D33HyjTzjQ4MtfwO79w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to