-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
102 lines (95 loc) · 3.09 KB
/
serverless.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
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
95
96
97
98
99
100
101
102
service: r-builds
plugins:
- serverless-python-requirements
- serverless-step-functions
- serverless-better-credentials
custom: ${file(./serverless-custom.yml)}
package:
exclude:
- integration/**
- builder/**
- docs/**
# Generated files by other tools
- node_modules/**
- .npm/**
- .cache/**
provider:
name: aws
runtime: python3.11
stage: ${opt:stage, self:custom.defaultStage}
deploymentBucket:
name: ${self:custom.deploymentBucket}
tagsList:
- Key: rs:project
Value: ${self:custom.${self:provider.stage}.tags.project}
- Key: rs:owner
Value: ${self:custom.${self:provider.stage}.tags.owner}
- Key: rs:environment
Value: ${self:custom.${self:provider.stage}.tags.environment}
tagsMap:
"rs:owner": ${self:custom.${self:provider.stage}.tags.owner}
"rs:project": ${self:custom.${self:provider.stage}.tags.project}
"rs:environment": ${self:custom.${self:provider.stage}.tags.environment}
iamRoleStatements:
- Effect: Allow
Action:
- "batch:*"
Resource: '*'
- Effect: Allow
Action:
- "s3:*"
Resource:
- arn:aws:s3:::${self:custom.${self:provider.stage}.s3Bucket}
- arn:aws:s3:::${self:custom.${self:provider.stage}.s3Bucket}/*
- Effect: Allow
Action:
- "sns:Publish"
Resource:
Ref: rBuildsTopic
environment:
S3_BUCKET: ${self:custom.${self:provider.stage}.s3Bucket}
SNS_TOPIC_ARN:
Ref: rBuildsTopic
JOB_QUEUE_ARN:
Ref: rBuildsBatchJobQueue
JOB_DEFINITION_ARN_ubuntu_2004:
Ref: rBuildsBatchJobDefinitionUbuntu2004
JOB_DEFINITION_ARN_ubuntu_2204:
Ref: rBuildsBatchJobDefinitionUbuntu2204
JOB_DEFINITION_ARN_ubuntu_2404:
Ref: rBuildsBatchJobDefinitionUbuntu2404
JOB_DEFINITION_ARN_debian_10:
Ref: rBuildsBatchJobDefinitionDebian10
JOB_DEFINITION_ARN_debian_11:
Ref: rBuildsBatchJobDefinitionDebian11
JOB_DEFINITION_ARN_debian_12:
Ref: rBuildsBatchJobDefinitionDebian12
JOB_DEFINITION_ARN_centos_7:
Ref: rBuildsBatchJobDefinitionCentos7
JOB_DEFINITION_ARN_centos_8:
Ref: rBuildsBatchJobDefinitionCentos8
JOB_DEFINITION_ARN_rhel_9:
Ref: rBuildsBatchJobDefinitionRhel9
JOB_DEFINITION_ARN_opensuse_155:
Ref: rBuildsBatchJobDefinitionOpensuse155
JOB_DEFINITION_ARN_opensuse_156:
Ref: rBuildsBatchJobDefinitionOpensuse156
JOB_DEFINITION_ARN_fedora_39:
Ref: rBuildsBatchJobDefinitionFedora39
JOB_DEFINITION_ARN_fedora_40:
Ref: rBuildsBatchJobDefinitionFedora40
JOB_DEFINITION_ARN_fedora_41:
Ref: rBuildsBatchJobDefinitionFedora41
SUPPORTED_PLATFORMS: ubuntu-2004,ubuntu-2204,ubuntu-2404,debian-10,debian-11,debian-12,centos-7,centos-8,rhel-9,opensuse-155,opensuse-156,fedora-39,fedora-40,fedora-41
functions:
queueBuilds:
timeout: 90
handler: handler.queue_builds
jobQueueStatus:
handler: handler.poll_running_jobs
finished:
handler: handler.finished
stepFunctions:
stateMachines: ${file(./serverless-stepf.yml)}
resources:
Resources: ${file(./serverless-resources.yml)}