-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathTaskfile.yml
56 lines (52 loc) · 1.74 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
# github.com/go-task/task
version: '3'
vars:
BINARY_NAME: kubemq
VERSION: v2.4.0
tasks:
check_update:
cmds:
- go list -u -m -mod=mod -json all | go-mod-outdated -update -direct
lint:
cmds:
- golangci-lint run --disable gocritic --enable misspell --disable gosec
default:
env:
DEV: true
cmds:
- go build -o "{{.BINARY_NAME}}.exe" -ldflags "-X 'main.version={{.VERSION}}'"
- kubemq.exe server
goreleaser:
env:
TAG: v2.3.7
cmds:
- goreleaser --snapshot --skip-publish --rm-dist
rundocker:
cmds:
- docker run -it --rm -p 8080:8080 -p 50000:50000 -p 9090:9090 kubemq/{{.BINARY_NAME}}-community:{{.VERSION}}
docker:
env:
GOOS: linux
GOARCH: amd64
cmds:
- docker build --build-arg VERSION={{.VERSION}} . -t kubemq/{{.BINARY_NAME}}-community:{{.VERSION}}
- docker tag kubemq/{{.BINARY_NAME}}-community:{{.VERSION}} kubemq/{{.BINARY_NAME}}-community:latest
docker_push:
cmds:
- docker push kubemq/{{.BINARY_NAME}}-community:{{.VERSION}}
- docker push kubemq/{{.BINARY_NAME}}-community:latest
release:
cmds:
- task: tag
- task: docker_buildx
- task: goreleaser
docker_buildx:
cmds:
- docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION={{.VERSION}} . -t kubemq/{{.BINARY_NAME}}-community:{{.VERSION}} --push
- docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION={{.VERSION}} . -t kubemq/{{.BINARY_NAME}}-community:latest --push
- docker pull kubemq/{{.BINARY_NAME}}-community:{{.VERSION}}
- docker pull kubemq/{{.BINARY_NAME}}-community:latest
tag:
cmds:
- git tag -a {{.VERSION}} -m {{.VERSION}}
- git push origin main --tags