- unmigrated-wiki-markup
Documentation for Tasks for AWS 2.9 – other releases are available in the Tasks for AWS Documentation Directory.
View
or visit the current documentation home.
Deploying to AWS CodeDeploy
Workflow
The deployment workflow is illustrated by the following diagram:
The binding between those components is established indirectly and comprises the following activities:
- create an application – see the Create Application action of the AWS CodeDeploy Application task
- create and/or specify a deployment group – see the Create Deployment Group action of the AWS CodeDeploy Deployment Group task
- the target instances can be provisioned with AWS CloudFormation for example – see the Create Stack action of the AWS CloudFormation Stack task
- optionally specify a deployment configuration
- create and/or specify a deployment group – see the Create Deployment Group action of the AWS CodeDeploy Deployment Group task
- commit or upload the application source code (the 'Revision') – see the Upload File(s) action of the Amazon S3 Object task
- deploy an application revision for that application – see the Create Deployment action of the AWS CodeDeploy Deployment task
the AWS CodeDeploy Agent on each participating instance pulls the revision from the specified Amazon S3 bucket or GitHub repository and starts deploying the contents to that instance, following the instructions in the AppSpec file that's provided
Alternative workflow via CloudFormation
As an alternative to using the AWS CodeDeploy tasks built into Tasks for AWS, it is also possible to provision the CodeDeploy components directly via the AWS CloudFormation Stack task and the corresponding CloudFormation resource types:
A typical workflow based on CloudFormation might look as follows:
- commit or upload the application source code (the 'Revision') – see the Upload File(s) action of the Amazon S3 Object task
- create/update the CloudFormation stack that provisions the CodeDeploy application and deployment group – see the Create Stack action of the AWS CloudFormation Stack task
- You can use the Update stack, if it already exists option to reuse the same Bamboo job for both actions
- The deployment is not modeled as a resource of its own, rather as a property of the AWS::CodeDeploy::DeploymentGroup resource that specifies the AWS CodeDeploy application revision that will be deployed to the deployment group.