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"
|
version: "3"
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
NIX_CMD_BASE: nix develop . -c
|
NIX_CMD_BASE: nix develop . -c
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
ci:
|
ci:
|
||||||
cmds:
|
cmds:
|
||||||
|
- task: clean
|
||||||
- task: lint
|
- task: lint
|
||||||
- task: test
|
- task: test-all
|
||||||
- task: docker-local-import
|
|
||||||
- task: test-integration
|
|
||||||
|
|
||||||
ci-publish:
|
ci-publish:
|
||||||
cmds:
|
cmds:
|
||||||
|
- task: clean
|
||||||
- task: lint
|
- task: lint
|
||||||
- task: test
|
- task: test-all
|
||||||
- task: test-integration
|
|
||||||
- task: docker-publish
|
- task: docker-publish
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cmds:
|
||||||
|
- rm -rf result
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
|
status:
|
||||||
|
- test -f result
|
||||||
cmds:
|
cmds:
|
||||||
- nix build .#docker
|
- nix build .#docker
|
||||||
|
|
||||||
@ -29,12 +36,12 @@ tasks:
|
|||||||
--insecure-policy \
|
--insecure-policy \
|
||||||
copy \
|
copy \
|
||||||
docker-archive:$(readlink -f result) \
|
docker-archive:$(readlink -f result) \
|
||||||
docker-daemon:caddy-log-exporter:latest
|
docker-daemon:caddy-log-exporter:NOTUSE
|
||||||
- |
|
- |
|
||||||
{{.NIX_CMD_BASE}} \
|
{{.NIX_CMD_BASE}} \
|
||||||
skopeo \
|
skopeo \
|
||||||
inspect \
|
inspect \
|
||||||
docker-daemon:caddy-log-exporter:latest
|
docker-daemon:caddy-log-exporter:NOTUSE
|
||||||
|
|
||||||
docker-publish:
|
docker-publish:
|
||||||
requires:
|
requires:
|
||||||
@ -75,10 +82,16 @@ tasks:
|
|||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
cmds:
|
cmds:
|
||||||
|
- task: docker-local-import
|
||||||
- |
|
- |
|
||||||
{{.NIX_CMD_BASE}} \
|
{{.NIX_CMD_BASE}} \
|
||||||
go test -v -race ./test/integration/...
|
go test -v -race ./test/integration/...
|
||||||
|
|
||||||
|
test-all:
|
||||||
|
cmds:
|
||||||
|
- task: test
|
||||||
|
- task: test-integration
|
||||||
|
|
||||||
tidy:
|
tidy:
|
||||||
cmds:
|
cmds:
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
@ -99,7 +99,7 @@ func TestIntegration(t *testing.T) {
|
|||||||
"CADDY_LOG_EXPORTER_LOG_FILES": "/var/log/caddy/caddy.log",
|
"CADDY_LOG_EXPORTER_LOG_FILES": "/var/log/caddy/caddy.log",
|
||||||
},
|
},
|
||||||
Mounts: vol,
|
Mounts: vol,
|
||||||
Image: "caddy-log-exporter:latest",
|
Image: "caddy-log-exporter:NOTUSE",
|
||||||
ExposedPorts: []string{"2112:2112"},
|
ExposedPorts: []string{"2112:2112"},
|
||||||
WaitingFor: wait.ForHTTP("http://127.0.0.1:2112/healthz").
|
WaitingFor: wait.ForHTTP("http://127.0.0.1:2112/healthz").
|
||||||
WithStartupTimeout(5 * time.Minute),
|
WithStartupTimeout(5 * time.Minute),
|
||||||
|
Loading…
Reference in New Issue
Block a user