diff --git a/README.md b/README.md index 0926757c..792c4e3d 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,18 @@ withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'US } ``` +#### Note + +You should use a single quote (`'`) instead of a double quote (`"`) whenever you can. +This is particularly important in Pipelines where a statement may be interpreted by both the Pipeline engine and an external interpreter, such as a Unix shell (`sh`) or Windows Command (`bat`) or Powershell (`ps`). +This reduces complications with password masking and command processing. +The first step in the above example properly demonstrates this. +The next two steps use the basic Pipeline `echo` step. +The first one references the Groovy variable and needs no quotes. +The second one needs to use double quotes, so that the interpolation is performed in Groovy. + +For more information, see the Pipeline step reference for [Credentials Binding Plugin](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/). + ## Changelog See [GitHub Releases](https://github.com/jenkinsci/credentials-binding-plugin/releases) for new releases,