-
Notifications
You must be signed in to change notification settings - Fork 15
/
serverless-pipeline.yaml
61 lines (61 loc) · 2.84 KB
/
serverless-pipeline.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
steps:
- run: npm install @serverless-devs/s -g
- run: s -v
- run: s config add --AccountID ${{secrets.ACCOUNTID}} --AccessKeyID ${{secrets.ACCESS_KEY_ID}} --AccessKeySecret ${{secrets.ACCESS_KEY_SECRET}} -a default -f
- run: s deploy --use-local -y -t ./src/serverless-cd.yaml
env:
SESSION_EXPIRATION: ${{secrets.SESSION_EXPIRATION}}
DOWNLOAD_CODE_DIR: ${{secrets.DOWNLOAD_CODE_DIR}}
CD_PIPLINE_YAML: ${{secrets.CD_PIPLINE_YAML}}
REGION: ${{secrets.REGION}}
OSS_BUCKET: ${{secrets.OSS_BUCKET}}
OTS_INSTANCE_NAME: ${{secrets.OTS_INSTANCE_NAME}}
DOMAIN: ${{secrets.DOMAIN}}
OTS_TASK_TABLE_NAME: ${{secrets.OTS_TASK_TABLE_NAME}}
OTS_USER_TABLE_NAME: ${{secrets.OTS_USER_TABLE_NAME}}
OTS_APP_TABLE_NAME: ${{secrets.OTS_APP_TABLE_NAME}}
OTS_TOKEN_TABLE_NAME: ${{secrets.OTS_TOKEN_TABLE_NAME}}
OTS_TASK_INDEX_NAME: ${{secrets.OTS_TASK_INDEX_NAME}}
OTS_USER_INDEX_NAME: ${{secrets.OTS_USER_INDEX_NAME}}
OTS_APP_INDEX_NAME: ${{secrets.OTS_APP_INDEX_NAME}}
OTS_TOKEN_INDEX_NAME: ${{secrets.OTS_TOKEN_INDEX_NAME}}
ACCOUNTID: ${{secrets.ACCOUNTID}}
ACCESS_KEY_ID: ${{secrets.ACCESS_KEY_ID}}
ACCESS_KEY_SECRET: ${{secrets.ACCESS_KEY_SECRET}}
COOKIE_SECRET: ${{secrets.COOKIE_SECRET}}
- name: 钉钉成功通知
plugin: '@serverless-cd/ding-talk'
if: ${{ success() }}
inputs:
webhook: https://oapi.dingtalk.com/robot/send?access_token=${{secrets.DING_TALK_TOKEN}}
msgtype: markdown
secret: ${{secrets.DING_TALK_SECRET}}
payload:
title: 'Serverless CD'
text: |+
### [流水线](${{ task.url }})(Serverless CD)-运行成功
![image](https://img.alicdn.com/imgextra/i3/O1CN01DJ0QXx1iLPt5nGCBT_!!6000000004396-2-tps-468-57.png)
**任务**: [#${{task.id}}](${{ task.url }})
**触发事件**: ${{ git.event_name }}
**分支**: ${{ git.branch }}
**提交人**: ${{ git.pusher.name }}
**commit id**: ${{ git.commit }}
**commit message**: ${{ git.message }}
- name: 钉钉失败通知
plugin: '@serverless-cd/ding-talk'
if: ${{ failure() }}
inputs:
webhook: https://oapi.dingtalk.com/robot/send?access_token=${{secrets.DING_TALK_TOKEN}}
msgtype: markdown
secret: ${{secrets.DING_TALK_SECRET}}
payload:
title: 'Serverless CD'
text: |+
### [流水线](${{ task.url }})(Serverless CD)-运行失败
![image](https://img.alicdn.com/imgextra/i3/O1CN01DJ0QXx1iLPt5nGCBT_!!6000000004396-2-tps-468-57.png)
**任务**: [#${{task.id}}](${{ task.url }})
**触发事件**: ${{ git.event_name }}
**分支**: ${{ git.branch }}
**提交人**: ${{ git.pusher.name }}
**commit id**: ${{ git.commit }}
**commit message**: ${{ git.message }}