Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,8 @@
<a href="https://jenkins.io/blog/2019/02/21/credentials-masking/" target="_blank">Limitations of Credentials Masking</a>
blog post for more background.
</p>
<h4>Note</h4>
<p>
You should use a single quote (') instead of a double quote (") whenever you can.
This reduces complications with password masking and command processing.
</p>