Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 1.19

...

Code Block
languagegroovy
withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
  // available as an env variable, but will be masked if you try to print it out any which way
  // note: single quotes prevent Groovy interpolation; expansion is by Bourne Shell, which is what you want
  sh 'echo $PASSWORD'
  // also available as a Groovy variable
  echo USERNAME
  // or inside double quotes for string interpolation
  echo "username is $USERNAME"
}

Changelog

Version 1.19 (2019-05-31)

  • Jira
    serverJenkins JIRA
    serverIddd058dce-0c66-3b77-8b09-71b1d7728747
    keyJENKINS-42950
     Expanded secret masking to include some variants commonly produced by shells when metacharacters are involved.

Version 1.18 (2019-02-25)

  • Jira
    serverJenkins JIRA
    serverIddd058dce-0c66-3b77-8b09-71b1d7728747
    keyJENKINS-42950
     Better documentation about limitations and best practices.
  • Jira
    serverJenkins JIRA
    serverIddd058dce-0c66-3b77-8b09-71b1d7728747
    keyJENKINS-49337
     Avoiding blocking the Pipeline interpreter during block cleanup even if Remoting hangs.
  • Avoid printing a stack trace when a credentialsId  is not found.

Version 1.17 (2018-10-29)

  • Improved stream flush behavior in light of JEP-210.

...