I'm using the Drone.IO CI/CD software to build and publish an image to an ECR in another AWS account, in the same region EU-WEST-1.
I have setup the IAM artefacts and it is connecting but failing on the last step. It seems that Drone is ignoring my registry option im passing it and just using the registry from the AWS API call.
Drone is running in account 0987654321 and Im trying to push the image to account 1234567890.
ecr:
image: plugins/ecr
registry: 12345677890.dkr.ecr.eu-west-1.amazonaws.com
repo: repo1/app_name
region: eu-west-1
tags: latest
dockerfile: Dockerfile
I get the following error:
+ /usr/local/bin/docker tag blah 0987654321.dkr.ecr.eu-west-1.amazonaws.com/repo1/app_name:latest
+ /usr/local/bin/docker push 0987654321.dkr.ecr.eu-west-1.amazonaws.com/repo1/app_name:latest
The push refers to repository [0987654321.dkr.ecr.eu-west-1.amazonaws.com/repo1/app_name]
name unknown: The repository with name repo1/app_name does not exist in the registry with id '0987654321'
Which makes it appear as though its not even using the registry attribute and using the registry from the API call.