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