-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Hi,
Am I missing something or does the Mask Passwords plugin only support single line strings?
stages { stage('Secret-Masking') { script { MASKED_SECRET = 'I_AM_MASKED' MULTI_LINE_MASKED_SECRET = """I_AM _NOT_MASKED""" wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MASKED_SECRET]]]) { echo 'MASKED_SECRET: ' + MASKED_SECRET } wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MULTI_LINE_MASKED_SECRET]]]) { echo 'MULTI_LINE_MASKED_SECRET: ' + MULTI_LINE_MASKED_SECRET } } } }
Output is:
MASKED_SECRET: ********
MULTI_LINE_MASKED_SECRET: I_AM
_NOT_MASKED
Thanks.
[JENKINS-73620] Mask Passwords doesn't support multi-line strings
Description |
Original:
Hi,
Am I missing something or does the masked passwords plugin only support single line strings? {code:java} stages { stage('Secret-Masking') { script { MASKED_SECRET = 'I_AM_MASKED' MULTI_LINE_MASKED_SECRET = """I_AM _NOT_MASKED""" wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MASKED_SECRET]]]) { echo 'MASKED_SECRET: ' + MASKED_SECRET } wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MULTI_LINE_MASKED_SECRET]]]) { echo 'MULTI_LINE_MASKED_SECRET: ' + MULTI_LINE_MASKED_SECRET } } } } {code} Output is: MASKED_SECRET: ******** MULTI_LINE_MASKED_SECRET: I_AM _NOT_MASKED Thanks. |
New:
Hi,
Am I missing something or does the Mask Passwords plugin only support single line strings? {code:java} stages { stage('Secret-Masking') { script { MASKED_SECRET = 'I_AM_MASKED' MULTI_LINE_MASKED_SECRET = """I_AM _NOT_MASKED""" wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MASKED_SECRET]]]) { echo 'MASKED_SECRET: ' + MASKED_SECRET } wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: MULTI_LINE_MASKED_SECRET]]]) { echo 'MULTI_LINE_MASKED_SECRET: ' + MULTI_LINE_MASKED_SECRET } } } } {code} Output is: MASKED_SECRET: ******** MULTI_LINE_MASKED_SECRET: I_AM _NOT_MASKED Thanks. |