caddy-log-exporter/Taskfile.yml

86 lines
1.7 KiB
YAML
Raw Normal View History

2024-09-19 11:21:05 +02:00
version: "3"
vars:
NIX_CMD_BASE: nix develop . -c
tasks:
ci:
cmds:
- task: lint
- task: test
- task: docker-build
- task: docker-local-import
- task: test-integration
2024-09-20 09:21:49 +02:00
ci-publish:
cmds:
- task: lint
- task: test
- task: test-integration
- task: docker-build
- task: docker-publish
2024-09-20 09:21:49 +02:00
docker-build:
cmds:
- nix build .#docker
docker-local-import:
cmds:
- |
{{.NIX_CMD_BASE}} \
skopeo \
--insecure-policy \
copy \
docker-archive:$(readlink -f result) \
docker-daemon:caddy-log-exporter:latest
- |
{{.NIX_CMD_BASE}} \
skopeo \
inspect \
docker-daemon:caddy-log-exporter:latest
docker-publish:
2024-09-20 09:21:49 +02:00
requires:
vars:
- GITHUB_USERNAME
- GITHUB_PASSWORD
- GIT_TAG
cmds:
- |
{{.NIX_CMD_BASE}} \
skopeo \
--insecure-policy \
copy \
--dest-username {{.GITHUB_USERNAME}} --dest-password {{.GITHUB_PASSWORD}} \
docker-archive:$(readlink -f result) \
2024-09-20 09:21:49 +02:00
docker://ghcr.io/xsteadfastx/caddy-log-exporter:{{.GIT_TAG}}
2024-09-19 11:21:05 +02:00
docker-inspect:
cmds:
- |
{{.NIX_CMD_BASE}} \
skopeo \
inspect \
docker-archive:$(readlink -f result)
2024-09-19 11:21:05 +02:00
lint:
cmds:
2024-09-20 09:21:49 +02:00
- |
{{.NIX_CMD_BASE}} \
golangci-lint run --enable-all
2024-09-19 11:21:05 +02:00
test:
cmds:
2024-09-20 09:21:49 +02:00
- |
{{.NIX_CMD_BASE}} \
go test -v -race ./internal/...
test-integration:
cmds:
- |
{{.NIX_CMD_BASE}} \
go test -v -race ./test/integration/...
2024-09-19 12:01:49 +02:00
tidy:
cmds:
- go mod tidy
- go mod vendor