You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, just to raise awareness that this issue is still open, and that the official documentation still states that this is the way to add credentials to a Jenkinsfile. I recently found myself trying to guess the syntax by searching Jenkinsfiles in GitHub.
As a reference for anyone trying to guess how to bind variables to AWS secrets, this is what I did:
withCredentials([aws(credentialsId: 'XXXXXXXX', accessKeyVariable: 'S3_ACCESS_KEY_ID', secretKeyVariable: 'S3_SECRET_ACCESS_KEY')]) {
sh 'upload.sh'
}
Version report
Jenkins and plugins versions report:
Reproduction steps
withCredentials
Results
Expected result:
A nice pipeline like
or
(as seen on https://www.jenkins.io/doc/pipeline/steps/credentials-binding/#withcredentials-bind-credentials-to-variables)
Actual result:
The text was updated successfully, but these errors were encountered: