-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
123 lines (111 loc) · 3.55 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
#
# Happy Coding!
service: gitwize-lambda
# app and org for use with dashboard.serverless.com
#app: gitwize
#org: wizeline
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
frameworkVersion: '>=1.28.0 <2.0.0'
provider:
name: aws
runtime: go1.x
# you can overwrite defaults here
stage: ${opt:stage, 'dev'}
region: ap-southeast-1
# you can add statements to the Lambda function's IAM Role here
iamRoleStatements:
- Effect: "Allow"
Action:
- "rds:*"
Resource: "*"
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
Resource: "*"
# you can define service wide environment variables here
# environment:
# variable1: value1
package:
exclude:
- ./**
include:
- ./bin/**
- ./scripts/filestat.sh
- ./scripts/diffstat
functions:
update_one_repo:
handler: bin/update_one_repo
layers:
- arn:aws:lambda:${self:provider.region}:863257328258:layer:mysql_8_0_18_layer:1
- arn:aws:lambda:${self:provider.region}:553035198032:layer:git-lambda2:6
memorySize: 1024
timeout: 900
environment:
DB_CONN_STRING: ${env:DB_CONN_STRING}
USE_DEFAULT_API_TOKEN: "TRUE"
DEFAULT_GITHUB_TOKEN: ${env:DEFAULT_GITHUB_TOKEN}
CYPHER_PASS_PHASE: ${env:CYPHER_PASS_PHASE}
APP_STAGE: ${opt:stage}
load_full_one_repo:
handler: bin/load_full_one_repo
layers:
- arn:aws:lambda:${self:provider.region}:863257328258:layer:mysql_8_0_18_layer:1
- arn:aws:lambda:${self:provider.region}:553035198032:layer:git-lambda2:6
memorySize: 2048
timeout: 900
environment:
DB_CONN_STRING: ${env:DB_CONN_STRING}
USE_DEFAULT_API_TOKEN: "TRUE"
DEFAULT_GITHUB_TOKEN: ${env:DEFAULT_GITHUB_TOKEN}
CYPHER_PASS_PHASE: ${env:CYPHER_PASS_PHASE}
APP_STAGE: ${opt:stage}
update_all_repos:
handler: bin/update_all_repos
layers:
- arn:aws:lambda:${self:provider.region}:863257328258:layer:mysql_8_0_18_layer:1
- arn:aws:lambda:${self:provider.region}:553035198032:layer:git-lambda2:6
memorySize: 1024
timeout: 900
environment:
DB_CONN_STRING: ${env:DB_CONN_STRING}
USE_DEFAULT_API_TOKEN: "TRUE"
DEFAULT_GITHUB_TOKEN: ${env:DEFAULT_GITHUB_TOKEN}
CYPHER_PASS_PHASE: ${env:CYPHER_PASS_PHASE}
APP_STAGE: ${opt:stage}
events:
- schedule: "cron(0 0/8 * * ? *)"
load_metrics:
handler: bin/load_metrics
layers:
- arn:aws:lambda:${self:provider.region}:863257328258:layer:mysql_8_0_18_layer:1
- arn:aws:lambda:${self:provider.region}:553035198032:layer:git-lambda2:6
memorySize: 1024
timeout: 900
environment:
DB_CONN_STRING: ${env:DB_CONN_STRING}
APP_STAGE: ${opt:stage}
events:
- schedule: "cron(20 0/8 * * ? *)"
git_native_example:
handler: bin/git_native_example
memorySize: 128
timeout: 60
environment:
USE_DEFAULT_API_TOKEN: "TRUE"
DEFAULT_GITHUB_TOKEN: ${env:DEFAULT_GITHUB_TOKEN}
CYPHER_PASS_PHASE: ${env:CYPHER_PASS_PHASE}
APP_STAGE: ${opt:stage}
layers:
- arn:aws:lambda:${self:provider.region}:553035198032:layer:git-lambda2:6