Full Credentials (w/ Usage) Example?

76 views
Skip to first unread message

Cole Mickens

unread,
Feb 1, 2018, 12:44:49 PM2/1/18
to job-dsl-plugin
Can anyone point me to a full example of job-dsl with the credentials wrapper binding?

  Doesn't show usage of the credentials (for example, in a shell script). What good is binding the password without the username as well? How are these consumed?

  Says that first argument to credentials() is the name of the build variable that will be bound to (part of) the secret value.

  On the other hand, says that the bound variables are surfaced as environment variables

Thanks!

Cole Mickens

unread,
Feb 1, 2018, 12:47:20 PM2/1/18
to job-dsl-plugin
It seems to get more confusing:

// Sets one variable to the username and one variable to the password given in the credentials.
usernamePassword(String userVariableName, String passwordVariableName, String credentials)

versus:


usernamePassword('PASSWORD', 'keystore password')

Makes for a rather confusing example. At least the example could say 'USERPASS' as the variable name, or show binding for both values, maybe. (And can credential id's have spaces?)
Reply all
Reply to author
Forward
0 new messages