[JIRA] (JENKINS-61386) Declarative `credentials` step should allow override-able variable names

2 views
Skip to first unread message

Jared@Kauppi.la (JIRA)

unread,
Mar 8, 2020, 9:47:04 PM3/8/20
to jenkinsc...@googlegroups.com
Jared Kauppila created an issue
 
Jenkins / Improvement JENKINS-61386
Declarative `credentials` step should allow override-able variable names
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: credentials-plugin
Created: 2020-03-09 01:46
Priority: Minor Minor
Reporter: Jared Kauppila

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')
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages