I have stored some credentials in my Jenkins with the help of the Credentials plugin.
These credentials are stored at Global (jenkins/credentials/store/system/domain/_).
node {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'amazon',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
}
}
But how can I retrieve the credentials from Jenkins and how can I use them in similar way as previous example?
If I stored the credentials (Credentials plugin asks for Username and Password), is mandatory to specify the usernameVariable and passwordVariable as in previous example?
Thank you.