-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
160 lines (148 loc) · 3.11 KB
/
.drone.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
---
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
steps:
- name: install
image: node:lts
commands:
- cd frontend
- yarn ci
- name: lint
image: node:lts
commands:
- cd frontend
- yarn lint
depends_on:
- install
- name: unit-test
image: node:lts
commands:
- cd frontend
- yarn test:unit --coverage
depends_on:
- lint
- name: e2e-test-chrome
image: cypress/included:10.11.0
commands:
- cd frontend
- cypress info
- yarn test:e2e:ci:chrome
depends_on:
- lint
- name: e2e-test-firefox
image: cypress/included:10.11.0
commands:
- cd frontend
- cypress info
- yarn test:e2e:ci:firefox
depends_on:
- lint
- name: code-analysis
image: aosapps/drone-sonar-plugin
settings:
sonar_host:
from_secret: sonar_host
sonar_token:
from_secret: sonar_token
level: DEBUG
showProfiling: true
depends_on:
- unit-test
- e2e-test-chrome
- e2e-test-firefox
- name: build
image: node:lts
commands:
- cd frontend
- yarn build
environment:
VITE_TASK_ENDPOINT:
from_secret: VITE_TASK_ENDPOINT
VITE_IMPRINT_CITY:
from_secret: VITE_IMPRINT_CITY
VITE_IMPRINT_EMAIL:
from_secret: VITE_IMPRINT_EMAIL
VITE_IMPRINT_NAME:
from_secret: VITE_IMPRINT_NAME
VITE_IMPRINT_POSTAL_CODE:
from_secret: VITE_IMPRINT_POSTAL_CODE
VITE_IMPRINT_STREET:
from_secret: VITE_IMPRINT_STREET
depends_on:
- code-analysis
- name: deploy-docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
target: production-stage
repo: michigg/web-sense
auto_tag: true
dockerfile: frontend/Dockerfile
context: frontend
when:
branch:
- main
event:
- tag
- push
depends_on:
- build
- name: publish-github
image: plugins/gh-pages
commands:
- touch frontend/dist/.nojekyll
settings:
username:
from_secret: github_username
password:
from_secret: github_password
pages_directory: frontend/dist
when:
branch:
- main
event:
- tag
- push
depends_on:
- build
- name: notify
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
roomid:
from_secret: matrix_roomid
userid:
from_secret: matrix_userid
accesstoken:
from_secret: matrix_accesstoken
template: >
{{#success build.status}}
✅ {{repo.owner}}/{{repo.name}} {{build.number}}
{{else}}
❌ {{repo.owner}}/{{repo.name}} {{build.number}}
{{/success}}
depends_on:
- deploy
when:
status:
- success
- failure
depends_on:
- deploy-docker
- publish-github
- build
trigger:
event:
- cron
- custom
- push
- pull_request
- tag