build: moving things around
This commit is contained in:
parent
0232c98382
commit
62b1b8fb49
@ -1,3 +0,0 @@
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/caddy-log-exporter"]
|
||||
COPY caddy-log-exporter /
|
27
Taskfile.yml
27
Taskfile.yml
@ -1,22 +1,29 @@
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
NIX_CMD_BASE: nix develop . -c
|
||||
|
||||
tasks:
|
||||
ci:
|
||||
cmds:
|
||||
- task: clean
|
||||
- task: lint
|
||||
- task: test
|
||||
- task: docker-local-import
|
||||
- task: test-integration
|
||||
- task: test-all
|
||||
|
||||
ci-publish:
|
||||
cmds:
|
||||
- task: clean
|
||||
- task: lint
|
||||
- task: test
|
||||
- task: test-integration
|
||||
- task: test-all
|
||||
- task: docker-publish
|
||||
|
||||
clean:
|
||||
cmds:
|
||||
- rm -rf result
|
||||
|
||||
docker-build:
|
||||
status:
|
||||
- test -f result
|
||||
cmds:
|
||||
- nix build .#docker
|
||||
|
||||
@ -29,12 +36,12 @@ tasks:
|
||||
--insecure-policy \
|
||||
copy \
|
||||
docker-archive:$(readlink -f result) \
|
||||
docker-daemon:caddy-log-exporter:latest
|
||||
docker-daemon:caddy-log-exporter:NOTUSE
|
||||
- |
|
||||
{{.NIX_CMD_BASE}} \
|
||||
skopeo \
|
||||
inspect \
|
||||
docker-daemon:caddy-log-exporter:latest
|
||||
docker-daemon:caddy-log-exporter:NOTUSE
|
||||
|
||||
docker-publish:
|
||||
requires:
|
||||
@ -75,10 +82,16 @@ tasks:
|
||||
|
||||
test-integration:
|
||||
cmds:
|
||||
- task: docker-local-import
|
||||
- |
|
||||
{{.NIX_CMD_BASE}} \
|
||||
go test -v -race ./test/integration/...
|
||||
|
||||
test-all:
|
||||
cmds:
|
||||
- task: test
|
||||
- task: test-integration
|
||||
|
||||
tidy:
|
||||
cmds:
|
||||
- go mod tidy
|
||||
|
@ -99,7 +99,7 @@ func TestIntegration(t *testing.T) {
|
||||
"CADDY_LOG_EXPORTER_LOG_FILES": "/var/log/caddy/caddy.log",
|
||||
},
|
||||
Mounts: vol,
|
||||
Image: "caddy-log-exporter:latest",
|
||||
Image: "caddy-log-exporter:NOTUSE",
|
||||
ExposedPorts: []string{"2112:2112"},
|
||||
WaitingFor: wait.ForHTTP("http://127.0.0.1:2112/healthz").
|
||||
WithStartupTimeout(5 * time.Minute),
|
||||
|
Loading…
Reference in New Issue
Block a user