-
Notifications
You must be signed in to change notification settings - Fork 0
/
master.yaml
73 lines (60 loc) · 2.38 KB
/
master.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
AWSTemplateFormatVersion: 2010-09-09
Description: >
This template deploys CI/CD for the application which will be used to deploy
the final API gateway
Parameters:
CodeBuildImage:
Type: String
Description: Image used for CodeBuild project.
Default: "aws/codebuild/standard:2.0"
GitHubRepoName:
Type: String
Description: The GitHub repo name
GitHubRepoBranch:
Type: String
Description: The GitHub repo branch code pipelines should watch for changes on
Default: master
GitHubToken:
Type: String
Description: "Secret. OAuthToken with access to Repo. Long string of characters and digits. Go to https://github.com/settings/tokens"
NoEcho: true
GitHubUser:
Type: String
Description: GitHub UserName. This username must have access to the GitHubToken.
Resources:
pipelineRoles:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/aws-lambda-benchmark/pipeline-roles.yaml
Parameters:
AppName: !Ref AWS::StackName
AppStackName: !Sub ${AWS::StackName}-serverless-stack
artifactBucket:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/aws-lambda-benchmark/artifact-bucket.yaml
Parameters:
AppName: !Ref AWS::StackName
CodePipelineRoleName: !GetAtt pipelineRoles.Outputs.CodePipelineRoleName
CodeBuildRoleName: !GetAtt pipelineRoles.Outputs.CodeBuildRoleName
LambdaDeployRoleName: !GetAtt pipelineRoles.Outputs.LambdaDeployRoleName
pipeline:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/aws-lambda-benchmark/pipeline.yaml
Parameters:
AppName: !Ref AWS::StackName
AppStackName: !Sub ${AWS::StackName}-serverless-stack
GitHubRepoName: !Ref GitHubRepoName
GitHubRepoBranch: !Ref GitHubRepoBranch
GitHubToken: !Ref GitHubToken
GitHubUser: !Ref GitHubUser
ArtifactS3Bucket: !GetAtt artifactBucket.Outputs.ArtifactS3BucketName
CodeBuildImage: !Ref CodeBuildImage
CodePipelineRoleArn: !GetAtt pipelineRoles.Outputs.CodePipelineRoleArn
CodeBuildRoleArn: !GetAtt pipelineRoles.Outputs.CodeBuildRoleArn
LambdaDeployRoleArn: !GetAtt pipelineRoles.Outputs.LambdaDeployRoleArn
Outputs:
PipelineUrl:
Value: !GetAtt pipeline.Outputs.PipelineUrl