-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
66 lines (56 loc) · 1.5 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
# https://taskfile.dev
version: '3'
set:
- "errexit"
- "nounset"
- "pipefail"
includes:
demo: ./tasks/Taskfile.demo.yml
vcluster:
taskfile: ./tasks/Taskfile.vcluster.yml
internal: true
tools:
taskfile: ./tasks/Taskfile.tools.yml
internal: true
tasks:
create-env:
desc: "Create the vcluster"
deps:
- task: tools:ensure-kubectl
cmds:
- task: vcluster:create
- task: vcluster:expose
list-env:
desc: "List all vclusters"
cmds:
- task: vcluster:list
delete-env:
desc: "Destroy the vcluster"
cmds:
- task: vcluster:delete
deploy-app:
desc: "Deploy the application"
deps:
- task: tools:ensure-kubectl
- task: tools:ensure-helm
- task: tools:ensure-kustomize
- task: tools:ensure-skaffold
cmds:
- task: vcluster:connect
- defer: { task: vcluster:disconnect }
- task: set-domain
vars:
PREVIEW_DOMAIN: '{{.PREVIEW_DOMAIN | default "otel-demo.localhost"}}'
PREVIEW_ENVIRONMENT_PATH: opentelemetry-demo/preview
- cmd: skaffold deploy --status-check=false -m opentelemetry-demo
set-domain:
internal: true
deps:
- task: tools:ensure-kustomize
dir: "{{.PREVIEW_ENVIRONMENT_PATH}}"
preconditions:
- sh: test -n "{{.PREVIEW_DOMAIN}}"
msg: Please set the PREVIEW_DOMAIN variable.
- sh: test -n "{{.PREVIEW_ENVIRONMENT_PATH}}"
cmds:
- kustomize edit set annotation preview/domain:"{{.PREVIEW_DOMAIN}}"