forked from zoellner/sharp-heic-lambda-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-buildproject.yaml
64 lines (61 loc) · 1.81 KB
/
sample-buildproject.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
AWSTemplateFormatVersion: '2010-09-09'
Description: CodeBuild Project for sharp-heic-lambda-layer
Parameters:
SourceRepo:
Description: Github Location for Source Repo
Type: String
Default: https://github.com/zoellner/sharp-heic-lambda-layer.git
CodeBuildRole:
Description: ARN of IAM Role used to build the layer
Type: String
BadgeEnabled:
Description: Enable Build Badge
Type: String
Default: false
AllowedValues:
- true
- false
DeploymentBucket:
Description: Name of an S3 Bucket used for deployment
Type: String
Resources:
SharpHEICCodeBuild:
Type: AWS::CodeBuild::Project
Properties:
Name: sharp-heic-lambda-layer
Description: Sharp Lambda Layer with HEIC Support
ServiceRole: !Ref CodeBuildRole
BadgeEnabled: !Ref BadgeEnabled
Artifacts:
Type: NO_ARTIFACTS
Source:
Auth:
Type: OAUTH
Type: GITHUB
Location: !Ref SourceRepo
Environment:
Type: LINUX_CONTAINER
ComputeType: BUILD_GENERAL1_MEDIUM
Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0
ImagePullCredentialsType: CODEBUILD
PrivilegedMode: true
EnvironmentVariables:
- Name: SAM_BUCKET
Type: PLAINTEXT
Value: !Ref DeploymentBucket
- Name: STACK_NAME
Type: PLAINTEXT
Value: sharp-heic-lambda-layer
Cache:
Type: NO_CACHE
Triggers:
# BuildType: BUILD
FilterGroups:
- - Type: EVENT
Pattern: PUSH
ExcludeMatchedPattern: false
- Type: HEAD_REF
Pattern: '^refs/tags/.*'
ExcludeMatchedPattern: false
Webhook: true
EncryptionKey: !Sub arn:aws:kms:${AWS::Region}:${AWS::AccountId}:alias/aws/s3