-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.yml
34 lines (33 loc) · 1.04 KB
/
pipeline.yml
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
Resources:
CodeBuildSourceCredntial:
Type: 'AWS::CodeBuild::SourceCredential'
Properties:
AuthType: PERSONAL_ACCESS_TOKEN
ServerType: GITHUB
Token: >-
{{resolve:secretsmanager:GITHUB_ACCESS:SecretString:GITHUB_ACCESS_TOKEN}}
CodeBuildProject:
Type: 'AWS::CodeBuild::Project'
Properties:
Name: !Ref 'AWS::StackName'
ServiceRole: 'arn:aws:iam::481118440516:role/CodeBuildServiceRole'
Source:
Type: GITHUB
Location: 'https://github.com/barochiarg/aws-learning.git'
BuildSpec: buildspec.yml
Auth:
Type: OAUTH
Resource: !Ref CodeBuildSourceCredntial
Artifacts:
Type: NO_ARTIFACTS
Triggers:
Webhook: true
FilterGroups:
- - Type: EVENT
Pattern: 'PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED'
- Type: BASE_REF
Pattern: refs/heads/main
Environment:
Type: LINUX_CONTAINER
ComputeType: BUILD_GENERAL1_SMALL
Image: 'aws/codebuild/standard:4.0'