-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
58 lines (50 loc) · 1.29 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
58
# https://taskfile.dev
version: "3"
silent: true
env:
CSI_IMAGE: dev-registry.deckhouse.io/virt/dev/dvp-csi-driver:latest
CSI_BUILDER_IMAGE: dvp-csi-driver-builder:latest
tasks:
build:cache:
desc: "Build CSI cache"
cmds:
- |
echo "Build cache image $CSI_BUILDER_IMAGE ..."
docker build . \
--target builder \
--platform linux/amd64 \
-t ${CSI_BUILDER_IMAGE}
push:
desc: "Build CSI image and push to registry"
deps:
- build:cache
cmds:
- |
echo "Build CSI image $CSI_IMAGE ..."
docker build . \
--build-arg BUILDER_CACHE_IMAGE=${CSI_BUILDER_IMAGE} \
--platform linux/amd64 \
-t ${CSI_IMAGE}
- |
echo "Push CSI image $CSI_IMAGE_NAME ..."
docker push ${CSI_IMAGE}
lint:
desc: "Run linters locally"
cmds:
- task: lint:go
lint:go:
desc: "Run golangci-lint"
deps:
- _ensure:golangci-lint
cmds:
- |
golangci-lint run --sort-results
_ensure:golangci-lint:
desc: "Ensure golangci-lint is available"
cmds:
- |
echo -e >&2 "Please install golangci-lint https://golangci-lint.run/usage/install/"
exit 1
status:
- |
[ -f ./golangci-lint ] || which golangci-lint