-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
75 lines (67 loc) · 1.81 KB
/
Taskfile.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
---
# yaml-language-server: $schema=https://json.schemastore.org/taskfile.json
version: 3
includes:
sample: ./tasks/sample.yml
activity: ./tasks/activity.yml
message: ./tasks/message.yml
traefik: ./tasks/service/traefik.yml
go: ./tasks/helper/golang.yml
vars:
SAMPLE_APP_DIR: ./cmd/sample
ACTIVITY_APP_DIR: ./cmd/activity
PKG_DIR: ./pkg
tasks:
setup-deps:
desc: Setup the basic dependencies to run the application.
cmds:
- task: sample:setup-deps
- task: message:setup-deps
- task: activity:setup-deps
init:
desc: Initialize the development environment
cmds:
- task: sample:init
- task: message:init
run:tests:
desc: Test all the applications.
cmds:
- task: go:test
vars:
GO_PROJECT_FOLDER: '{{ .PKG_DIR }}'
- task: sample:run-tests
all:up:
desc: Start the applications with traefik API Gateway
cmds:
- task: sample:start
- task: traefik:up
all:down:
desc: Start the applications with traefik API Gateway
cmds:
- task: traefik:down
- task: sample:down
- task: activity:down
- task: sample:grafana:down
- task: sample:prometheus:down
- task: sample:jaeger:down
go-checks:
desc: "To run all the code checks for the sample application."
cmds:
- task: go:vet
vars:
GO_PROJECT_FOLDER: '{{ .SAMPLE_APP_DIR }}'
- task: go:lint
vars:
GO_PROJECT_FOLDER: '{{ .SAMPLE_APP_DIR }}'
- task: go:vet
vars:
GO_PROJECT_FOLDER: '{{ .ACTIVITY_APP_DIR }}'
- task: go:lint
vars:
GO_PROJECT_FOLDER: '{{ .ACTIVITY_APP_DIR }}'
- task: go:vet
vars:
GO_PROJECT_FOLDER: '{{ .PKG_DIR }}'
- task: go:lint
vars:
GO_PROJECT_FOLDER: '{{ .PKG_DIR }}'