Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

atlassian/aws-ecs-deploy:1.9.0 does not update ECS task definition/image

Hello,

Using atlassian/aws-ecs-deploy:1.9.0 pipe for updating ECS services and noticed a bug/defect on it.

As part of the parameters passed to it, you can provide both the TASK_DEFINITION and/or the IMAGE_NAME variable, however, the image is not used to update the task definition image anywhere.

Function _update_task_definition(..., image = None)_ declares it, but never uses it and _run(...)_ passes it around line ~230 when _update_task_definition_ is called.

Please fix the pipe to properly update the task definition image with IMAGE_NAME if it is passed.

 

AWS_SECRET_ACCESS_KEY and AWS_SECRET_ACCESS_KEY are passed empty due to bug https://jira.atlassian.com/browse/BCLOUD-22913 even tho using OIDC.

YAML

...

pipelines:

  <branch>:

    - step:

         name: Update ECS Service

         oidc: true

         script:

           - export IMAGE_NAME=${REGISTRY}/${BITBUCKET_REPO_SLUG}:${

BITBUCKET_COMMIT}
           - pipe: atlassian/aws-ecs-deploy:1.9.0
              variables:
                 AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
                 AWS_SECRET_ACCESS_KEY: ''
                 AWS_ACCESS_KEY_ID: ''
                 AWS_OIDC_ROLE_ARN: ${AWS_ROLE_ARN}
                 CLUSTER_NAME: ${CLUSTER_NAME}
                 SERVICE_NAME: ${BITBUCKET_REPO_SLUG}
                 IMAGE_NAME: ${IMAGE_NAME}
                 TASK_DEFINITION: ${BITBUCKET_REPO_SLUG}-task-def.json
                 FORCE_NEW_DEPLOYMENT: 'true'
...
Ref

https://bitbucket.org/atlassian/aws-ecs-deploy/src/master/pipe/main.py

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 06, 2023

@Alexandre Alencar hi. Thanks for your investigation. In current version of the pipe IMAGE_NAME variable is not supported and not presented in the README. You could see it in the code, but it's always None. We will refactor the logic to prevent misunderstandings.

All required settings (i.e image name) you could declare in the task definition file, check this official AWS example.

 

Regards, Igor

Suggest an answer

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

Atlassian Community Events