-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: credentials-binding-plugin
-
Environment:Operating System: Host=macOS 10.13.6 Guest=jenkinsci/blueocean on Docker
Plugin: Credentials Binding Plugin v1.16
I found credentials-binding-plugin prints raw text when use secret text start with whitespace (like " secret") .
Here is my sample pipeline script:
Â
node {
withCredentials([string(credentialsId: 'SAMPLE_CREDENTIAL', variable: 'SAMPLE_CREDENTIAL')]) {
sh 'echo $SAMPLE_CREDENTIAL'
}
}
All output:
Started by user user
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on Jenkins in /var/jenkins_home/workspace/print_credential_pipeline
[Pipeline] {
[Pipeline] withCredentials
[Pipeline] {
[Pipeline] sh
[print_credential_pipeline] Running shell script
+ echo****
credential test
{{[Pipeline] }}}
[Pipeline] // withCredentials
{{[Pipeline] }}}
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS