Skip to content

Instantly share code, notes, and snippets.

@li0nel
Created February 5, 2018 14:27
Show Gist options
  • Save li0nel/63a61e874c6bf23cef0636c1f551bb63 to your computer and use it in GitHub Desktop.
Save li0nel/63a61e874c6bf23cef0636c1f551bb63 to your computer and use it in GitHub Desktop.
CodePipeline
ArtifactBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn: !GetAtt CodePipelineServiceRole.Arn
ArtifactStore:
Type: S3
Location: !Ref ArtifactBucket
Stages:
- Name: Source
Actions:
- Name: App
ActionTypeId:
Category: Source
Owner: AWS
Version: 1
Provider: CodeCommit
Configuration:
RepositoryName: !GetAtt CodeRepository.Name
BranchName: !Ref RepositoryBranch
OutputArtifacts:
- Name: App
RunOrder: 1
- Name: Build
Actions:
- Name: Build
ActionTypeId:
Category: Build
Owner: AWS
Version: 1
Provider: CodeBuild
Configuration:
ProjectName: !Ref CodeBuildProject
InputArtifacts:
- Name: App
OutputArtifacts:
- Name: BuildOutput
RunOrder: 1
- Name: Deploy
Actions:
- Name: Deploy
ActionTypeId:
Category: Deploy
Owner: AWS
Version: 1
Provider: ECS
Configuration:
ClusterName: !Ref Cluster
ServiceName: !Ref Service
FileName: images.json
InputArtifacts:
- Name: BuildOutput
RunOrder: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment