CodeDeploy Deploy
Type: DEVRAMPS:CODEDEPLOY:DEPLOY
Category: deploy
Version: 1.0.0
Description
Deploy to EC2 Auto Scaling Groups using AWS CodeDeploy.
Deploys application bundles to EC2 instances in an Auto Scaling Group using AWS CodeDeploy. Supports blue/green and in-place deployment strategies, automatic rollback on failure, and configurable deployment configurations. The bundle at the specified S3 URL must contain an appspec.yml file defining the deployment lifecycle hooks.
Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
application_name | string | The name of the CodeDeploy application. |
deployment_group_name | string | The name of the deployment group. |
s3_url | string | S3 URL of the bundle artifact containing appspec.yml (e.g., s3://bucket/key.zip). Use ${{ stage.artifacts['name'].s3_url }} to reference a bundle artifact. |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
account_id | string | - | The AWS account ID where CodeDeploy is configured. Defaults to stage account. |
region | string | - | The AWS region. Defaults to stage region. |
deployment_config_name | string | "CodeDeployDefault.AllAtOnce" | CodeDeploy deployment configuration name (e.g., CodeDeployDefault.OneAtATime). |
auto_rollback | boolean | true | Automatically rollback the deployment if it fails. When enabled, CodeDeploy rolls back to the last successful revision on DEPLOYMENT_FAILURE. |
file_exists_behavior | enum: DISALLOW | OVERWRITE | RETAIN | - | How CodeDeploy handles files that already exist in the deployment target location. |
timeout | integer | 60 | Deployment timeout in minutes. |
Example Usage
- type: DEVRAMPS:CODEDEPLOY:DEPLOY
name: Deploy to ASG
params:
application_name: my-application
deployment_group_name: production-group
s3_url: ${{ stage.artifacts['app-bundle'].s3_url }}
deployment_config_name: CodeDeployDefault.AllAtOnce
timeout: 60