I'd use the Mask Password plugin to hide the exposed token from the console 
output so I don't think there would be a way to steal others users API 
tokens.

A password parameter would work but it means that they need to login 
twice...Not really a big deal; they've already logged into Jenkins.  I 
suppose this will be the fall-back if I can't figure this out using a 
system groovy script

The Jenkins DSL plugin doesn't support credentials as far as I know.

Thanks,
Joe

On Monday, December 21, 2015 at 3:00:25 PM UTC-7, Joe Ferr wrote:
>
> We use the gradle/groovy dsl to create our jenkins jobs.
>
> We have a need to have parameterized jenkins jobs which create 
> job-sets+views to avoid various folks needing to run gradle scripts/pass 
> parameters in order to create job sets.  For example a job set might 
> retrieve source from a specific git task branch then build a bunch of 
> components which get uploaded to Nexus.
>
> I can use a specific users username/api token in the gradle script, but it 
> would be much cleaner if the current logged in user's api token was somehow 
> exposed (as an env var?)/ made available to my gradle script.
>
>
> thanks,
> Joe
>

-- 
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/6d901b45-4141-4df4-a2e9-ca6d8bc253c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to