You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Pipe "atlassian/aws-ecr-push-image:2.0.0" fails to push the image to ECR even when login to ECR is successful.
Below is the step that I have for building the docker image, tagging it and pushing it to ECR. Please let me know if I am missing anything here.
- step:
name: Build Docker image
script:
- IMAGE_NAME="aws_account_number.dkr.ecr.us-east-1.amazonaws.com/tn-springboot-bitbucket-demo"
- docker build -t ${IMAGE_NAME} .
after-script:
- pipe: atlassian/aws-ecr-push-image:2.0.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_REGION
IMAGE_NAME: $ECR_REPOSITORY
TAGS: latest
The logs that are generated are as follows:
Status: Downloaded newer image for bitbucketpipelines/aws-ecr-push-image:2.0.0
INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
INFO: Executing the aws-ecr-push-image pipe...
INFO: Found credentials in environment variables.
INFO: Successfully logged in to https://aws_account_number.dkr.ecr.us-east-1.amazonaws.com
INFO: {'status': 'The push refers to repository [aws_account_number.dkr.ecr.us-east-1.amazonaws.com/<aws_account_number>.dkr.ecr.us-east-1.amazonaws.com/tn-springboot-bitbucket-demo]'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '9b55156abf26'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '293d5db30c9f'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '03127cdb479b'}
INFO: {'status': 'Preparing', 'progressDetail': {}, 'id': '9c742cd6c7a5'}
INFO: {'status': 'Waiting', 'progressDetail': {}, 'id': '293d5db30c9f'}
INFO: {'status': 'Waiting', 'progressDetail': {}, 'id': '03127cdb479b'}
INFO: {'status': 'Waiting', 'progressDetail': {}, 'id': '9c742cd6c7a5'}
INFO: {'status': 'Retrying in 5 seconds', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Retrying in 5 seconds', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Retrying in 5 seconds', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Retrying in 5 seconds', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'status': 'Retrying in 5 seconds', 'progressDetail': {}, 'id': '9b55156abf26'}
INFO: {'status': 'Retrying in 4 seconds', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Retrying in 4 seconds', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Retrying in 4 seconds', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Retrying in 4 seconds', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'status': 'Retrying in 4 seconds', 'progressDetail': {}, 'id': '9b55156abf26'}
INFO: {'status': 'Retrying in 3 seconds', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Retrying in 3 seconds', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Retrying in 3 seconds', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Retrying in 3 seconds', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'status': 'Retrying in 3 seconds', 'progressDetail': {}, 'id': '9b55156abf26'}
INFO: {'status': 'Retrying in 2 seconds', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Retrying in 2 seconds', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Retrying in 2 seconds', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Retrying in 2 seconds', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'status': 'Retrying in 2 seconds', 'progressDetail': {}, 'id': '9b55156abf26'}
INFO: {'status': 'Retrying in 1 second', 'progressDetail': {}, 'id': '25428ec2c0ce'}
INFO: {'status': 'Retrying in 1 second', 'progressDetail': {}, 'id': 'b626401ef603'}
INFO: {'status': 'Retrying in 1 second', 'progressDetail': {}, 'id': '6b5aaff44254'}
INFO: {'status': 'Retrying in 1 second', 'progressDetail': {}, 'id': '53a0b163e995'}
INFO: {'errorDetail': {'message': 'EOF'}, 'error': 'EOF'}
✖ Docker push error: EOF
Despite this failure, the pipeline is shown as "Successful" which is terribly wrong. This consumed most of my Premium Trial Build Limits. :(
Attaching multiple instances of the same as screenshot below:
Thank you for your question!
We'll investigate the issue and notify you.
Please, pay attention that IMAGE_NAME variable for the pipe should be IMAGE_NAME that you build according to the documentation in the readme. (i.e. "tn-springboot-bitbucket-demo" according to the logs you provided)
Also, have you tried push the image with the pipe in the same step and script section instead of after-script section?
- step:
name: Build Docker image
script:
- IMAGE_NAME="aws_account_number.dkr.ecr.us-east-1.amazonaws.com/tn-springboot-bitbucket-demo"
- docker build -t ${IMAGE_NAME} .
- pipe: atlassian/aws-ecr-push-image:2.0.0
variables:
IMAGE_NAME: $IMAGE_NAME
TAGS: latest
Best regards,
Oleksandr Kyrdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.