-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
57 lines (50 loc) · 1.46 KB
/
Taskfile.yaml
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
version: "3"
tasks:
portf:
desc: Port-forward prometheus from the current kube ctx
vars:
ns: '{{ .ns | default "monitoring" }}'
svc: '{{ .svc | default "kube-prometheus-stack-prometheus"}}'
local: '{{ .local | default "9090" }}'
remote: '{{ .remote | default "9090" }}'
cmds:
- kubectl -n {{ .ns }} port-forward svc/{{ .svc }} {{ .local }}:{{ .remote }}
query:
desc: Run the query sub-command
silent: true
cmds:
- go run main.go query
serve:
desc: Run the http server
cmds:
- go generate
- go run main.go serve
docker:build:
desc: Build the docker image
requires:
vars:
- tag
cmds:
- docker build . -t henrywhitaker3/prompage:{{ .tag }} --build-arg VERSION="{{ .tag }}"
docker:run:
desc: Build and run the docker image
vars:
tag:
sh: head -n 10 /dev/random | md5sum | cut -c1-6
cmds:
- task: docker:build
vars:
tag: '{{ .tag }}'
- docker run --net=host --rm -v $(pwd)/prompage.yaml:/prompage.yaml henrywhitaker3/prompage:{{ .tag }} {{ .CLI_ARGS }}
helm:install:
desc: Install the helm chart
vars:
values: '{{ .values | default "chart/values.yaml" }}'
ns: '{{ .ns | default "prompage" }}'
name: '{{ .name | default "prompage" }}'
cmds:
- helm upgrade --install -f chart/{{ .values }} -n {{ .ns }} {{ .name }} chart/
default:
silent: true
cmds:
- task -l