Skip to main content

CodeDeploy Deploy

Stable

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

ParameterTypeDescription
application_namestringThe name of the CodeDeploy application.
deployment_group_namestringThe name of the deployment group.
s3_urlstringS3 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

ParameterTypeDefaultDescription
account_idstring-The AWS account ID where CodeDeploy is configured. Defaults to stage account.
regionstring-The AWS region. Defaults to stage region.
deployment_config_namestring"CodeDeployDefault.AllAtOnce"CodeDeploy deployment configuration name (e.g., CodeDeployDefault.OneAtATime).
auto_rollbackbooleantrueAutomatically rollback the deployment if it fails. When enabled, CodeDeploy rolls back to the last successful revision on DEPLOYMENT_FAILURE.
file_exists_behaviorenum: DISALLOW | OVERWRITE | RETAIN-How CodeDeploy handles files that already exist in the deployment target location.
timeoutinteger60Deployment 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