-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.example.yml
44 lines (37 loc) · 1.4 KB
/
serverless.example.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
service: my_service
provider:
name: aws
runtime: python2.7 # StackStorm runners are based on Python 2
functions:
get_issue:
stackstorm: # `stackstorm` object replaces `handler`. The rest is the same.
action: github.get_issue
input:
user: "{{ input.pathParameters.user }}"
repo: "{{ input.pathParameters.repo }}"
issue_id: "{{ input.pathParameters.issue_id }}"
output:
statusCode: 200
body: "{{ output.result.body }}"
config:
# Optional: use token for private repos or actions requiring authorization
# token: ${env:GITHUB_TOKEN}
environment:
${file(env.yml):github}
# Uncomment the following line to enable debug mode (log level will be set
# to debug and more debug related information will be logged)
# ST2_DEBUG: "true"
events:
- http:
method: GET
path: issues/{user}/{repo}/{issue_id}
custom:
# Optional settings, to adjust defaults to your liking
stackstorm:
runImage: 'lambci/lambda:python2.7'
buildImage: 'lambci/lambda:build-python2.7'
indexRoot: 'https://index.stackstorm.org/v1/'
st2common_pkg: 'git+https://github.com/stackstorm/st2.git#egg=st2common&subdirectory=st2common'
python_runner_pkg: 'git+https://github.com/StackStorm/st2.git#egg=python_runner&subdirectory=contrib/runners/python_runner'
plugins:
- serverless-plugin-stackstorm