CircleCI-Public / aws-ecs-orb

An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
https://circleci.com/orbs/registry/orb/circleci/aws-ecs
MIT License
51 stars 80 forks source link

Command `deploy_ecs_scheduled_task` failing even when defined the `rule_name` parameter #222

Closed diogonicoleti closed 1 month ago

diogonicoleti commented 1 month ago

Orb version:

5.2.0

What happened:

I defined the following commands in a job:

  deploy-ecs-scheduled-task:
    parameters:
      task_name:
        type: string
    docker:
      - image: 'cimg/python:3.10.5'
    steps:
      - aws-cli/setup:
          role_arn: "${AWS_ROLE_ARN}"
          role_session_name: "CircleCI-${CIRCLE_JOB}"
      - aws-ecs/update_task_definition:
          family: '${CIRCLE_BRANCH}-app-<< parameters.task_name >>'
          container-image-name-updates: 'container=app-<< parameters.task_name >>,tag=${CIRCLE_SHA1}'
      - aws-ecs/deploy_ecs_scheduled_task:
          rule_name: << pipeline.git.branch >>-app-<< parameters.task_name >>-event-rule

but even defining the rule_name I got the following error in the deploy_ecs_scheduled_task command:

To deploy with an scheduled task, you must provide a rule name

Exited with code exit status 1

Expected behavior:

Successfully deploy rule with the updated task definition

Additional Information:

N/A

marboledacci commented 1 month ago

Thanks for the heads up and your solution, the new version has this fix already.

diogonicoleti commented 1 month ago

Nice! Thanks @marboledacci I upgraded the orb version in my pipeline and it's working fine!