-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
85 lines (76 loc) · 1.78 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
kind: pipeline
type: kubernetes
name: test
trigger:
event: [push]
steps:
- name: frontend
image: node:16.15.1-alpine3.16
commands:
- cd frontend
- yarn install --pure-lockfile
- yarn lint
depends_on: [clone]
- name: backend
image: node:16.15.1-alpine3.16
commands:
- cd backend
- yarn install --pure-lockfile
- yarn lint
- yarn test
depends_on: [clone]
---
kind: pipeline
type: kubernetes
name: build
trigger:
event: [push]
branch: [master]
steps:
- name: builder
image: plugins/docker
settings:
target: builder
username: { from_secret: quay_username }
password: { from_secret: quay_password }
registry: quay.io
repo: quay.io/zebbra/timetracker
tags: builder
cache_from:
- quay.io/zebbra/timetracker:builder
mtu: 1300
- name: release
image: plugins/docker
settings:
username: { from_secret: quay_username }
password: { from_secret: quay_password }
registry: quay.io
repo: quay.io/zebbra/timetracker
tags: "latest,git-${DRONE_COMMIT_SHA:0:7}"
cache_from:
- quay.io/zebbra/timetracker:builder
- quay.io/zebbra/timetracker:latest
mtu: 1300
---
kind: pipeline
type: kubernetes
name: deploy
depends_on:
- test
- build
trigger:
event: [push]
branch: [master]
steps:
- name: production
image: pelotech/drone-helm3
settings:
kube_api_server: https://kubernetes.default
kube_token: { from_secret: kubernetes_token }
kube_certificate: { from_secret: kubernetes_certificate }
chart: ./deploy/helm
release: timetracker
namespace: medi
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}
values_files: [deploy/production.yaml]
reuse_values: false