-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathTaskfile.yml
More file actions
113 lines (104 loc) · 2.77 KB
/
Taskfile.yml
File metadata and controls
113 lines (104 loc) · 2.77 KB
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
version: '3'
vars:
APP_NAME: cs
DOCKER_IMAGE: cs
WORKING_DIR:
sh: "echo `pwd`"
TOOLS_DIR: "{{.WORKING_DIR}}/bin"
includes:
radar-ui:
taskfile: ./radar-ui/Taskfile.yml
dir: ./radar-ui
reverse-proxy:
taskfile: ./reverse-proxy/Taskfile.yml
dir: ./reverse-proxy
cluster-manager:
taskfile: ./cluster-manager/Taskfile.yml
dir: ./cluster-manager
history-api:
taskfile: ./history-api/Taskfile.yml
dir: ./history-api
policy-enforcer:
taskfile: ./policy-enforcer/Taskfile.yml
dir: ./policy-enforcer
notifier:
taskfile: ./notifier/Taskfile.yml
dir: ./notifier
event-processor:
taskfile: ./event-processor/Taskfile.yml
dir: ./event-processor
runtime-monitor:
taskfile: ./runtime-monitor/Taskfile.yml
dir: ./runtime-monitor
auth-center:
taskfile: ./auth-center/Taskfile.yml
dir: ./auth-center
public-api:
taskfile: ./public-api/Taskfile.yml
dir: ./public-api
cs-manager:
taskfile: ./cs-manager/Taskfile.yml
dir: ./cs-manager
tasks:
proto:
desc: "Generate proto files for all backend services"
cmds:
- for: &backend-services
- auth-center
- cluster-manager
- history-api
- policy-enforcer
- notifier
- event-processor
- runtime-monitor
- cs-manager
- public-api
task: "{{.ITEM}}:proto"
proto-clean:
desc: "Clean generated proto files for all backend services"
cmds:
- for: *backend-services
task: "{{.ITEM}}:clean"
docker-build:
desc: "Build docker images for all services"
cmds:
- for: &docker-services
- auth-center
- cluster-manager
- history-api
- policy-enforcer
- notifier
- event-processor
- runtime-monitor
- public-api
- cs-manager
- reverse-proxy
task: "{{.ITEM}}:docker-build"
docker-push:
desc: "Push docker images"
requires:
vars: [IMAGE_REGISTRY]
cmds:
- for: *docker-services
task: "{{.ITEM}}:docker-push"
vars:
IMAGE_REGISTRY: "{{.IMAGE_REGISTRY}}"
IMAGE_TAG: "{{.IMAGE_TAG}}"
test-backend:
desc: "Test all backend services using docker"
cmds:
- for: *backend-services
task: "{{.ITEM}}:test-docker"
tools:
status:
- test -e {{.TOOLS_DIR}}/golangci-lint{{exeExt}}
- test -e {{.TOOLS_DIR}}/govulncheck{{exeExt}}
cmds:
- GOBIN={{.TOOLS_DIR}} go install github.com/golangci/golangci-lint/cmd/golangci-lint
- GOBIN={{.TOOLS_DIR}} go install golang.org/x/vuln/cmd/govulncheck
lint:
desc: "Run golangci-lint for all backend services"
deps: [tools]
cmds:
- for: *backend-services
task: "{{.ITEM}}:lint"