You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-23
Original file line number
Diff line number
Diff line change
@@ -113,27 +113,28 @@ Include the `aws-code-deploy` from NPM as a local or global dependency.
113
113
114
114
Environment variables are used to control the deployment actions. A brief summary is listed in the table below. Full descriptions with recommendations can be found by searching the readme for the variable name.
| `AWS_CODE_DEPLOY_KEY` | No | If specified, sets the AWS key id |
119
-
| `AWS_CODE_DEPLOY_SECRET` | No | If specified, sets the AWS secret key |
120
-
| `AWS_CODE_DEPLOY_REGION` | No | If specified, sets the AWS region |
121
-
| `AWS_CODE_DEPLOY_APPLICATION_NAME` | **Yes** | Application name. If it does not exist, will create. |
122
-
| `AWS_CODE_DEPLOY_DEPLOYMENT_GROUP_NAME` | **Yes** | Deployment group name. If it does not exist, will create. |
123
-
| `AWS_CODE_DEPLOY_DEPLOYMENT_CONFIG_NAME` | No | Deployment config name. By default: _CodeDeployDefault.OneAtATime_ |
124
-
| `AWS_CODE_DEPLOY_MINIMUM_HEALTHY_HOSTS` | No | The minimum number of healthy instances during deployment. By default: _type=FLEET_PERCENT,value=75_ |
125
-
| `AWS_CODE_DEPLOY_SERVICE_ROLE_ARN` | No | Service role arn giving permissions to use Code Deploy when creating a deployment group |
126
-
| `AWS_CODE_DEPLOY_EC2_TAG_FILTERS` | No | EC2 tags to filter on when creating a deployment group |
127
-
| `AWS_CODE_DEPLOY_AUTO_SCALING_GROUPS` | No | Auto Scaling groups when creating a deployment group |
128
-
| `AWS_CODE_DEPLOY_APP_SOURCE` | **Yes** | The source directory used to create the deploy archive or a pre-bundled tar, tgz, or zip |
129
-
| `AWS_CODE_DEPLOY_S3_BUCKET` | **Yes** | The name of the S3 bucket to deploy the revision |
130
-
| `AWS_CODE_DEPLOY_S3_KEY_PREFIX` | No | A prefix to use for the revision bucket key |
131
-
| `AWS_CODE_DEPLOY_S3_FILENAME` | **Yes** | The destination name within S3. |
132
-
| `AWS_CODE_DEPLOY_S3_LIMIT_BUCKET_FILES` | No | Number of revisions to limit. If 0, unlimited. Default = `0` |
133
-
| `AWS_CODE_DEPLOY_S3_SSE` | No | If specified and `true` will ensure the CodeDeploy archive is stored in S3 with Server Side Encryption (SSE) |
134
-
| `AWS_CODE_DEPLOY_REVISION_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific revision |
135
-
| `AWS_CODE_DEPLOY_DEPLOYMENT_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific deployment |
136
-
| `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` |
| `AWS_CODE_DEPLOY_KEY` | No | If specified, sets the AWS key id |
119
+
| `AWS_CODE_DEPLOY_SECRET` | No | If specified, sets the AWS secret key |
120
+
| `AWS_CODE_DEPLOY_REGION` | No | If specified, sets the AWS region |
121
+
| `AWS_CODE_DEPLOY_APPLICATION_NAME` | **Yes** | Application name. If it does not exist, will create. |
122
+
| `AWS_CODE_DEPLOY_DEPLOYMENT_GROUP_NAME` | **Yes** | Deployment group name. If it does not exist, will create. |
123
+
| `AWS_CODE_DEPLOY_DEPLOYMENT_CONFIG_NAME` | No | Deployment config name. By default: _CodeDeployDefault.OneAtATime_ |
124
+
| `AWS_CODE_DEPLOY_MINIMUM_HEALTHY_HOSTS` | No | The minimum number of healthy instances during deployment. By default: _type=FLEET_PERCENT,value=75_ |
125
+
| `AWS_CODE_DEPLOY_SERVICE_ROLE_ARN` | No | Service role arn giving permissions to use Code Deploy when creating a deployment group |
126
+
| `AWS_CODE_DEPLOY_EC2_TAG_FILTERS` | No | EC2 tags to filter on when creating a deployment group |
127
+
| `AWS_CODE_DEPLOY_AUTO_SCALING_GROUPS` | No | Auto Scaling groups when creating a deployment group |
128
+
| `AWS_CODE_DEPLOY_APP_SOURCE` | **Yes** | The source directory used to create the deploy archive or a pre-bundled tar, tgz, or zip |
129
+
| `AWS_CODE_DEPLOY_S3_BUCKET` | **Yes** | The name of the S3 bucket to deploy the revision |
130
+
| `AWS_CODE_DEPLOY_S3_KEY_PREFIX` | No | A prefix to use for the revision bucket key |
131
+
| `AWS_CODE_DEPLOY_S3_FILENAME` | **Yes** | The destination name within S3. |
132
+
| `AWS_CODE_DEPLOY_S3_LIMIT_BUCKET_FILES` | No | Number of revisions to limit. If 0, unlimited. Default = `0` |
133
+
| `AWS_CODE_DEPLOY_S3_SSE` | No | If specified and `true` will ensure the CodeDeploy archive is stored in S3 with Server Side Encryption (SSE) |
134
+
| `AWS_CODE_DEPLOY_REVISION_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific revision |
135
+
| `AWS_CODE_DEPLOY_DEPLOYMENT_DESCRIPTION` | No | A description that is stored within AWS Code Deploy that stores information about the specific deployment |
136
+
| `AWS_CODE_DEPLOY_DEPLOYMENT_FILE_EXISTS_BEHAVIOR` | No | String `DISALLOW|OVERWRITE|RETAIN` that defines how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment. Default = `DISALLOW`
137
+
| `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` |
137
138
138
139
139
140
## Examples
@@ -145,8 +146,6 @@ Environment variables are used to control the deployment actions. A brief summar
145
146
machine:
146
147
147
148
environment:
148
-
DEPLOY_DIR: $HOME/deploy
149
-
150
149
# We are defining the $AWS_CODE_DEPLOY_KEY and $AWS_CODE_DEPLOY_SECRET in the CircleCI Project Settings >
151
150
# AWS Permissions which automatically configure these for use via aws cli and are automatically read
152
151
# via aws-code-deploy.sh. Alternatively, these could be specified securely (not via project code) using
Copy file name to clipboardExpand all lines: bin/aws-code-deploy.sh
+10
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,10 @@ if [ -z "$AWS_CODE_DEPLOY_S3_FILENAME" ]; then
157
157
exit 1
158
158
fi
159
159
160
+
if [[ -n"$AWS_CODE_DEPLOY_DEPLOYMENT_FILE_EXISTS_BEHAVIOR"&&!"$AWS_CODE_DEPLOY_DEPLOYMENT_FILE_EXISTS_BEHAVIOR"=~ ^(DISALLOW|OVERWRITE|RETAIN)$ ]];then
161
+
error "$AWS_CODE_DEPLOY_DEPLOYMENT_FILE_EXISTS_BEHAVIOR is not a valid option for the \"\$AWS_CODE_DEPLOY_DEPLOYMENT_FILE_EXISTS_BEHAVIOR\" variable"
0 commit comments