Skip to content

Commit 427e99e

Browse files
authored
Merge pull request #16 from MyHelp-Ltd/master
add support for "--ignore-application-stop-failures"
2 parents cf3ffa0 + acad035 commit 427e99e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ Environment variables are used to control the deployment actions. A brief summar
135135
| `AWS_CODE_DEPLOY_REVISION_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific revision |
136136
| `AWS_CODE_DEPLOY_DEPLOYMENT_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific deployment |
137137
| `AWS_CODE_DEPLOY_OUTPUT_STATUS_LIVE` | No | Boolean `true\|false` that specifies whether the deployment status should use a single line showing live status. In CI environments where the `\r` is not supported, set this to `false` for better logging. Default = `true` |
138+
| `AWS_CODE_DEPLOY_IGNORE_APPLICATION_STOP_FAILURES` | No | Boolean `true\|false` that specifies whether ApplicatonStop failures should be ignored. Set this to `true` to ignore ApplicatonStop failures. Default = `false` |
139+
138140
## Examples
139141

140142
### CircleCI

bin/aws-code-deploy.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,13 @@ runCommand "${REGISTER_APP_CMD}" \
498498
# ----------------------
499499
DEPLOYMENT_DESCRIPTION="$AWS_CODE_DEPLOY_DEPLOYMENT_DESCRIPTION"
500500
h1 "Step 10: Creating Deployment"
501-
DEPLOYMENT_CMD="aws deploy create-deployment --output json --application-name $APPLICATION_NAME --deployment-config-name $DEPLOYMENT_CONFIG_NAME --deployment-group-name $DEPLOYMENT_GROUP --s3-location $S3_LOCATION"
501+
502+
IGNORE_APPLICATION_STOP_FAILURES_SWITCH=""
503+
if [ "true" == "${AWS_CODE_DEPLOY_IGNORE_APPLICATION_STOP_FAILURES}" ]; then
504+
# https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-deployments.html#troubleshooting-deployments-lifecycle-event-failures
505+
IGNORE_APPLICATION_STOP_FAILURES_SWITCH="--ignore-application-stop-failures"
506+
fi
507+
DEPLOYMENT_CMD="aws deploy create-deployment $IGNORE_APPLICATION_STOP_FAILURES_SWITCH --output json --application-name $APPLICATION_NAME --deployment-config-name $DEPLOYMENT_CONFIG_NAME --deployment-group-name $DEPLOYMENT_GROUP --s3-location $S3_LOCATION"
502508

503509
if [ -n "$DEPLOYMENT_DESCRIPTION" ]; then
504510
DEPLOYMENT_CMD="$DEPLOYMENT_CMD --description \"$DEPLOYMENT_DESCRIPTION\""

0 commit comments

Comments
 (0)