wrap: General Build Wrapper with class MaskPasswordsBuildWrapper not working

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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!

            Assignee:
            Unassigned
            Reporter:
            _peedus
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: