I'd like to be able to inject AWS credentials using the environment directive. However, this produces a stack trace.
environment {
AWS = credentials('key')
}
org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: No suitable binding handler could be found
for type com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl
wait I was hoping environment { CREDS = credentials('id-for-an-aws-cred') } would inject environment variables named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for you like withCredentials does.
Is that what we want? So you dont have to manually add them with string interpolation?