-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse-development-codepipeline-example.yaml
More file actions
94 lines (94 loc) · 2.94 KB
/
parse-development-codepipeline-example.yaml
File metadata and controls
94 lines (94 loc) · 2.94 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
AWSTemplateFormatVersion: 2010-09-09
Description: >-
AWS CloudFormation Template demonstrating how to create a CodePipeline to deploy Source
code to an Elastic Beanstalk enviroment. The stack contains a pipeline that polls a GitHub
Source repository for code changes, and deploys the code to an Elastic Beanstalk environment
when changes are detected. You will be billed for the AWS resources used if you create a
stack from this template.
Parameters:
ArtifactStoreBucket:
Type: String
Description: >-
S3 bucket to use for artifacts. Just bucket Name; not URL. IAM user should
have access to the bucket.
Default: 'YourS3BucketName'
GitHubToken:
NoEcho: 'true'
Type: String
Description: >-
Secret. It might look something like
9b189a1654643522561f7b3ebd44a1531a4287af OAuthToken with access to Repo.
Go to https://github.com/settings/tokens
GitHubUser:
Type: String
Description: GitHub username
Default: ''
Repo:
Type: String
Description: GitHub repo to pull from. Only the name, not the URL
Default: parse-server-example
Branch:
Type: String
Description: Branch to use from repo. Only the name, not the URL
Default: dev
MyInputArtifacts:
Type: String
Default: ParseSource
ParseApplicationName:
Type: String
Default: 'ParseDevelopmentApplication'
ParseEnvironmentName:
Type: String
Default: 'DevelopmentParseEnv'
CodePipelineServiceRole:
Type: String
Default: ''
Description: This IAM role must have proper permissions.
Resources:
AppPipeline:
Type: 'AWS::CodePipeline::Pipeline'
Properties:
RoleArn: !Ref CodePipelineServiceRole
Stages:
- Name: Source
Actions:
- InputArtifacts: []
Name: Source
ActionTypeId:
Category: Source
Owner: ThirdParty
Version: '1'
Provider: GitHub
OutputArtifacts:
- Name: !Ref MyInputArtifacts
Configuration:
Owner: !Ref GitHubUser
Repo: !Ref Repo
Branch: !Ref Branch
OAuthToken: !Ref GitHubToken
- Name: Deploy
Actions:
- InputArtifacts:
- Name: !Ref MyInputArtifacts
Name: Deploy
ActionTypeId:
Category: Deploy
Owner: AWS
Version: '1'
Provider: ElasticBeanstalk
Configuration:
ApplicationName: !Ref ParseApplicationName
EnvironmentName: !Ref ParseEnvironmentName
ArtifactStore:
Type: S3
Location: !Ref ArtifactStoreBucket
Outputs:
StackName:
Value: !Ref 'AWS::StackName'
CodePipelineURL:
Value: !Join
- ''
- - 'https://console.aws.amazon.com/codepipeline/home?region='
- !Ref 'AWS::Region'
- '#/view/'
- !Ref AppPipeline