Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,792
Community Members
 
Community Events
184
Community Groups

Pipe "atlassian/aws-ecr-push-image:2.0.0" fails to push the image to ECR

Arman Koradia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 05, 2023

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:
Screenshot 2023-04-05 at 5.35.43 PM.pngScreenshot 2023-04-05 at 5.36.12 PM.png
 

1 answer

0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 07, 2023

Hi @Arman Koradia 

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events