aws-ecr-orb
aws-ecr-orb copied to clipboard
create-repo fails if ECR repository already exists
Orb version
circleci/[email protected]
What happened
With the create-repo tag, the build fails if the repo already exists.
steps:
- setup_remote_docker
- aws-ecr/build-and-push-image:
region: ap-southeast-1
create-repo: true
assume-web-identity: true
role-arn: arn:aws:iam::xxxxxx:role/xxxxxx-role
repo: pdf-service
repo-scan-on-push: true
tag: <<parameters.imageTag>>
skip-when-tags-exist: false
I even tried with deleting the existing repo and let circleCI create it. But even then it fails at the second run.
Expected behavior
Only create the repo if it doesn't exist. If the repot exists, continue and use the existing repo.