CloudBees action: Deploy with AWS CodeDeploy

2 minute read

Use this action to trigger an AWS CodeDeploy deployment, a fully managed continuous delivery service, and fetch the run information as output.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 1. Input details
Input name Data type Required? Description

application-name

String

Yes

The name of an AWS CodeDeploy application.

auto-rollback-enabled

String

No

The configuration for an automatic rollback, added when a deployment is created.

auto-rollback-events

JSON

No

The event type or types that trigger a rollback.

deployment-config-name

String

Yes

The name of a deployment configuration.

deployment-group-name

String

Yes

The name of the deployment group.

description

String

Yes

Additional information about the deployment.

file-exists-behavior

String

No

Any information about how AWS CodeDeploy handles the files that already exist in a deployment target location, but were not part of the previous successful deployment.

ignore-application-stop-failures

Boolean

No

If this value is set to true, when an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, the deployment continues to the next deployment lifecycle event.

override-alarm-names

JSON

No

A list of alarms configured for the deployment or deployment group.

override-alarm-enabled

String

No

Indicates whether the alarm configuration is enabled.

appspec-content

String

No

The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

appspec-sha256

String

No

The SHA256 hash value of the revision content.

string-content

String

No

The content of a string input for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

string-sha256

String

No

The SHA256 hash value of the revision content.

github-commit-id

String

No

The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.

github-repository

String

No

The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

s3-bucket

String

No

The name of the Amazon S3 bucket where the application revision is stored.

s3-bundle-type

String

No

The file type of the application revision.

s3-key

String

No

The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

s3-artifact-version

String

No

The specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

revision-type

String

Yes

The type of application revision.

target-auto-scaling-groups

JSON

No

The names of one or more Auto Scaling groups to identify a replacement environment for a blue or green deployment.

target-instance-tag-filters

JSON

No

The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue or green deployment.

target-instance-tag-set

JSON

No

The information about the groups of Amazon EC2 instance tags.

Usage example

In your YAML file, add:

- id: login name: Configure aws credentials uses: cloudbees-io/configure-aws-credentials@v1 with: aws-region: us-east-1 aws-access-key-id: ${{ secrets.AWS_CODEDEPLOY_ACTIONS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_CODEDEPLOY_ACTIONS_SECRET_ACCESS_KEY }} - name: Create AWS CodeDeploy deployment uses: cloudbees-io/aws-codedeploy-invoke-deployment@v1 with: application-name: 'cb-sample-app' description: "CodeDeploy-ec2-deployment" deployment-group-name: 'cd-deployment-grp' revision-type: 'S3' s3-bucket: 'cb-codedeploy' s3-key: 'Archive.zip' s3-bundle-type: 'zip' deployment-config-name: 'CodeDeployDefault.OneAtATime' target-instance-tag-filters: '[{"Key":"Name","Type":"KEY_AND_VALUE","Value":"cb-codedeploy-web"}]'