AWS CodePipeline is a managed service that orchestrates workflow for continuous integration, continuous delivery, and continuous deployment. With CodePipeline, you define a series of stages composed of actions that perform tasks in a release process from a code commit all the way to production. It helps teams deliver changes to users whenever there’s a business need to do so.
If you use AWS CodePipeline for continuous delivery/deployment, one of the first pages you should visit its FAQ at https://aws.amazon.com/codepipeline/faqs/.
After you’ve gone through and used CodePipeline for your applications, you’ll probably want to learn more. If so, this README is a resource for you. In it, I go over the FAQ and, when appropriate, I provide more detailed examples along with more advanced topics with code and other examples. It’s intended as a more comprehensive view of the service.
Use the same integration in the RunOrder for each action you want to run in parallel within a particular stage.
- Name: Build
Actions:
- InputArtifacts:
- Name: MyApp
Name: cfn_nag
ActionTypeId:
Category: Test
Owner: AWS
Version: '1'
Provider: CodeBuild
OutputArtifacts: []
Configuration:
ProjectName:
Ref: CodeBuildWebsite
RunOrder: 1
- InputArtifacts:
- Name: MyApp
Name: Build
ActionTypeId:
Category: Build
Owner: AWS
Version: '1'
Provider: CodeBuild
OutputArtifacts:
- Name: MyAppBuild
Configuration:
ProjectName:
Ref: CodeBuildWebsite
RunOrder: 1
The only valid owner string is AWS
, ThirdParty
, or Custom
.
Here are examples of configuring action types in the AWS CloudFormation AWS::CodePipeline::Pipeline resource.
Name: Source
ActionTypeId:
Category: Source
Owner: ThirdParty
Version: '1'
Provider: GitHub
- Name: Artifact
ActionTypeId:
Category: Build
Owner: AWS
Version: '1'
Provider: CodeBuild
- Name: Jenkins
ActionTypeId:
Category: Build
Owner: Custom
Version: '1'
Provider: CodeBuild
Artifact Store is an S3 bucket used to securely store CodePipeline artifacts. When using the CodePipeline console in a region for the first time, CodePipeline automatically generates a new S3 bucket for all CodePipeline artifacts. You can also create your own S3 bucket and make a reference to the bucket from CodePipeline.
Here’s an example of doing this in AWS CloudFormation:
PipelineBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Delete
Within the S3 bucket designated for the pipeline(s), there are S3 keys/folders. There’s a different key for each artifact name used across all pipelines.
Here’s an example of the S3 keys within an S3 bucket. The names of keys are a truncated version of the Artifact names specified in CodePipeline when developers were creating their pipelines.
Name: Source
CodePipeline automatically encrypts artifacts using the default KMS key. You may also customize this by creating a custom KMS and assign it to the S3 artifacts.
Name: Source
You can disable/enable transitions using the AWS Console, API, CLI, or SDK.
Here’s an example of disabling a transition using the CLI:
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
(hooks, cloudwatch events, polling, etc.)
Name: Source
TBD
Name: Source
Only one at a time. The result is that your feedback time might be slowed down if you have too many actions in a particular stage and revisions get queued up waiting for the stage to complete.
Name: Source
From the CodePipeline console, select a specific pipeline. From the pipeline, click on View pipeline history. From the AWS CLI, you
aws codepipeline list-pipeline-executions --pipeline-name MyFirstPipeline
aws codepipeline get-pipeline-execution --pipeline-name MyFirstPipeline --pipeline-execution-id 7cf7f7cb-3137-539g-j458-d7eu3EXAMPLE
For more information, see View Pipeline Details and History in AWS CodePipeline.
TBD
Name: Source
What’s the duration for actions of the following provider types: CodeBuild, CodeDeploy, Lambda, CloudFormation, and Approval?
-
Approval action: 7 days
-
AWS CloudFormation deployment action: 3 days
-
AWS CodeBuild build action and test action: 8 hours
-
AWS CodeDeploy deployment action: 7 days
-
AWS Lambda invoke action: 1 hour
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
10
10
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
TBD
Name: Source
By calling the get-pipeline command from the AWS CLI. This returns a JSON object describing all components of a specific pipeline including stages, actions, artifacts, artifact store, providers, configuration, etc. Below, you see an example of running this command. Below, MyFirstPipeline is the unique name of the pipeline for a particular region.
aws codepipeline get-pipeline --name MyFirstPipeline --region us-east-1
TBD
How do I provide read-only access to a specific pipeline when provisioning the pipeline in CloudFormation?
TBD
AWS CloudFormation Amazon ECS AWS CodeDeploy AWS Elastic Beanstalk
https://aws.amazon.com/about-aws/whats-new/2018/09/aws-config-adds-support-for-aws-codepipeline/
-
What AWS service integrations are available with AWS CodePipeline? AWS CloudFormation AWS CodeBuild AWS CodeCommit AWS CodeDeploy AWS Config AWS Device Farm AWS Elastic Beanstalk AWS Key Management Service AWS Lambda Amazon ECS Amazon S3 AWS OpsWorks
Name: Source