Use this action to trigger an (AWS) CodeDeploy deployment, a fully managed continuous delivery service, and fetch the run information as output.
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
The name of an AWS CodeDeploy application . |
|
String |
No |
Configuration information for an automatic rollback that is added when a deployment is created. |
|
Json |
No |
The event type or types that trigger a rollback. |
|
String |
Yes |
The name of a deployment configuration. |
|
String |
Yes |
The name of the deployment group. |
|
String |
Yes |
A comment about the deployment. |
|
String |
No |
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren’t part of the previous successful deployment. |
|
Boolean |
No |
If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. |
|
Json |
No |
A list of alarms configured for the deployment or deployment group. |
|
String |
No |
Indicates whether the alarm configuration is enabled. |
|
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. |
|
String |
No |
The SHA256 hash value of the revision content. |
|
String |
No |
The content of an string input for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString. |
|
String |
No |
The SHA256 hash value of the revision content. |
|
String |
No |
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision. |
|
String |
No |
The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision. |
|
String |
No |
The name of the Amazon S3 bucket where the application revision is stored. |
|
String |
No |
The file type of the application revision. |
|
String |
No |
The name of the Amazon S3 object that represents the bundled artifacts for the application revision. |
|
String |
No |
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision. |
|
String |
Yes |
The type of application revision. |
|
Json |
No |
The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment. |
|
Json |
No |
The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. |
|
Json |
No |
Information about the groups of Amazon EC2 instance tags. |
EC2 Deployment
- 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"}]'Lambda Deployment
- 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-codedeploy-lamda-app'
description: "cb-codedeploy-lambda-grp-deployment"
deployment-group-name: 'cb-codedeploy-lambda-grp'
revision-type: 'AppSpecContent'
appspec-content: '{\"version\":\"0.0\",\"Resources\":[{\"MyLambdaFunction\":{\"Type\":\"AWS::Lambda::Function\",\"Properties\":{\"Name\":\"cb-codedeploy-lambda\",\"Alias\":\"cb-codedeploy-2\",\"CurrentVersion\":\"2\",\"TargetVersion\":\"1\"}}}]}'
deployment-config-name: 'CodeDeployDefault.OneAtATime'This code is made available under the MIT license.
-
Learn more about using actions in CloudBees workflows.
-
Learn about the CloudBees platform.