forked from jenseickmeyer/github-commit-status-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
51 lines (49 loc) · 1.61 KB
/
template.yaml
File metadata and controls
51 lines (49 loc) · 1.61 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Lambda function for updating the commit status on GitHub based on CodePipeline execution state changes.
Resources:
StatusUpdateFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Runtime: nodejs12.x
Timeout: 3
Policies:
- AWSCodePipelineReadOnlyAccess
- AWSLambdaBasicExecutionRole
Environment:
Variables:
ACCESS_TOKEN: "{{resolve:ssm:/github/personal_access_token:1}}"
Events:
Event:
Type: CloudWatchEvent
Properties:
Pattern:
source:
- aws.codepipeline
detail-type:
- "CodePipeline Pipeline Execution State Change"
detail:
pipeline:
- "TheUtilities_dev"
- "TheCICD_dev"
- "TheWebProduct_dev"
- "theapi_dev"
- "TheOrchestrator_dev"
- "TheCICD_qa"
- "TheWebProduct_qa"
- "theapi_qa"
- "TheOrchestrator_qa"
- "TheCICD_staging"
- "TheWebProduct_staging"
- "theapi_staging"
- "TheOrchestrator_staging"
- "TheCICD_prod"
- "TheWebProduct_prod"
- "theapi_prod"
- "TheOrchestrator_prod"
state:
- "STARTED"
- "SUCCEEDED"
- "FAILED"