CircleCI-Public / aws-code-deploy-orb

Easily deploy applications to AWS CodeDeploy on CircleCI with the aws-code-deploy orb
https://circleci.com/orbs/registry/orb/circleci/aws-code-deploy
MIT License
9 stars 13 forks source link

deploy-bundle arguments fail #6

Closed azamat-sharapov closed 2 years ago

azamat-sharapov commented 4 years ago

Orb Version

1.0.1

Describe the bug

When you pass arguments to deploy-bundle command, it passes them both for aws deploy create-deployment and aws deploy get-deployment, resulting deployment failure, like: Unknown options: --file-exists-behavior=OVERWRITE

To Reproduce

    steps:
      - aws-cli/setup
      ...
      - aws-code-deploy/deploy-bundle:
          ...
          arguments: "--file-exists-behavior OVERWRITE"

Expected behavior

We probably need 2 params for this. One for create-deployment subcommand, another for get-deployment.

btv commented 3 years ago

I am coming across this problem as well and would love to have either a work around or a fix.

btv commented 3 years ago

I think this is a general problem with "arguments", I tried to use the --ignore-application-stop-failures argument, and I get the same error. Looking at the error,

while [[ $STATUS == "Created" || $STATUS == "InProgress" || $STATUS == "Pending" || $STATUS == "Queued" || $STATUS == "Ready" ]]; do
  echo "Status: $STATUS..."
  STATUS=$(aws deploy get-deployment \
            --deployment-id $ID \
            --output text \
            --query '[deploymentInfo.status]' --ignore-application-stop-failures)
  sleep 5
done

it make me wonder if the get-deployment commnd, needs the arguments field inputs at all?

azamat-sharapov commented 3 years ago

As a workaround, I copied whole deploy-bundle command from orb source and edited it manually.

EricRibeiro commented 2 years ago

The issue was resolved in the PR #11.