-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Orb Version
1.0.0
Describe the bug
When passing an argument that only applies to one of the aws commands, like "file-exists-behavior, which applies to Create Deployment, but not to get application - the deployment will fail.
To Reproduce
Add the argument --file-exists-behaviour OVERWRITE to the deploy job
Expected behavior
The argument is used if it's relevant, and the deployment succeeds at overwriting files.
Additional context
Error in the ensure-application-created step:
#!/bin/bash -eo pipefail
set +e
aws deploy get-application --application-name Drupal-test --file-exists-behavior=OVERWRITE
if [ $? -ne 0 ]; then
set -e
echo "No application named Drupal-test found. Trying to create a new one"
aws deploy create-application --application-name Drupal-test --file-exists-behavior=OVERWRITE
else
set -e
echo "Application named Drupal-test already exists. Skipping creation."
fi
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --file-exists-behavior=OVERWRITE
No application named Drupal-test found. Trying to create a new one
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --file-exists-behavior=OVERWRITE
Exited with code exit status 255
CircleCI received exit code 255
Syntax used in my job:
- deploy-aws-test:
requires:
- build
filters:
branches:
only:
- develop
- aws-code-deploy/deploy:
name: Deploy to AWS CodeDeploy (Test)
requires:
- build
filters:
branches:
only:
- develop
pre-steps:
- queue/until_front_of_line:
time: '30'
dont-quit: true
- attach_workspace:
at: /tmp/
- run:
name: Untar artifact
command: |
mkdir /tmp/project/ && tar -xf /tmp/artifacts/*.tar -C /tmp/project/
- run:
name: Remove node_modules and .git
command: |
rm -rf /tmp/project/.git && rm -rf /tmp/project/static/node_modules
- slack/notify:
channel: #release-bots
color: '#3792cb'
message: Starting deployment to AWS Testing Environment
application-name: Drupal-test
bundle-bucket: REDACTED
bundle-key: REDACTED
deployment-group: DeploymentGroup-Drupal-test
service-role-arn: REDACTED
bundle-source: /tmp/project/
arguments: --file-exists-behavior OVERWRITE
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working