I am trying to pass the AWS secret key and password into jenkins script (which creates the env file)
My code:
node {
writeFile file: 'temp_env.txt', text: """
AWS_ACCESS_KEY= << Access Key >>
AWS_SECRET_KEY= << password >>
"""
docker.withRegistry('https://quay.io', 'c5234316dc-dqwqwda1-415645452-b343-406bf8332edb') {
sh 'docker pull quay.io/docker_image'
docker.image ('quay.iodocker_image').run('-it --env-file temp_env.txt --name test quay.io/docker_image:develop ./code/test1.py test-service')
sh 'rm temp_env.txt'
}
}
I am using the actual secret key and id, i would rather have the credentials injected here. How can I achieve it? I read the entire instructions here but was not able to figure out.
I know how to use the credentials binding plug-in, but not sure how I can add the user_name and password credentials variables to my code.

