amazon-web-servicesjenkinscicdamazon-ecr

Allowing ECR Credentials to persist inside Jenkins Docker Cloud configuration


I'm setting up a Docker Cloud (for dynamically assigning container agents) using the Docker plugin https://plugins.jenkins.io/docker-plugin/

Some of my images are saved on our AWS account's ECR, and I can't store persistent ECR credentials to fit this format, the Jenkins cloud configuration asks for -

I expected some workaround to exist, but instead I just simply can't pull images from ECR given I can't use anything like docker.withRegistry Since we're talking about configuration and not something inside the pipeline code. Anyone encountered enything similar? Or got any ideas on how to deal with it? Thanks!


Solution

  • Take a look at the aws-credentials plugin. It should be able to story any kind of AWS credentials and provide them for the registry auth.