-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
Within a declarative pipeline, I want to be able to override the automatic variables of `credentials()` as the tooling I'm using requires the environment variables to be of a particular name.
Currently, I must do the following:
BIGIP_CREDENTIALS = credentials('BIGIP_CREDENTIALS_ID') BIGIP_USER = "${env.BIGIP_CREDENTIALS_USR}" BIGIP_PASSWORD = "${env.BIGIP_CREDENTIALS_PSW}"
To avoid those additional steps (and security risk, as Jenkins will not strip the values of BIGIP_USER and BIGIP_PASSWORD from the output) I would rather do one of the following:
// Allow the user to override the automatic username/password variable names BIGIP_CREDENTIALS = credentials('BIGIP_CREDENTIALS_ID','BIGIP_USER','BIGIP_PASSWORD')
// Allow the use to only pull out the username or password BIGIP_USER = credentials('BIGIP_CREDENTIALS_ID', 'USER') BIGIP_PASSWORD = credentials('BIGIP_CREDENTIALS_ID', 'PASSWORD')