Hi, The below code prints the user and password value when shell command is executed in Jenkins pipeline.
wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [[password: 'id', var: 'clientid'], [password: 'secret', var: 'clientsecret']]]) {
sh "newman run collection.json --env-var user=${id} --env-var password=${secret}"
}
The whole purpose of the password masking is lost here NB: If one does only an echo of the above command (for instance [echo "newman run collection.json --env-var user=${id} --env-var password=${secret}"], the mask works fine. But it doesn't work in shell commands. Thanks! |