mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
test: add build targets for unused media test
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG ALPINE_VERSION=3.19
|
||||
ARG GO_VERSION=1.21
|
||||
ARG HTMLTEST_VERSION=0.17.0
|
||||
|
||||
@@ -76,5 +77,11 @@ COPY --from=build-upstream /out ./public
|
||||
ADD .htmltest.yml .htmltest.yml
|
||||
RUN htmltest
|
||||
|
||||
FROM alpine:${ALPINE_VERSION} AS unused-media
|
||||
RUN apk add --no-cache fd ripgrep
|
||||
WORKDIR /test
|
||||
RUN --mount=type=bind,target=. \
|
||||
./scripts/test_unused_media.sh
|
||||
|
||||
FROM scratch AS release
|
||||
COPY --from=build /out /
|
||||
|
||||
@@ -27,7 +27,7 @@ target "release" {
|
||||
}
|
||||
|
||||
group "validate" {
|
||||
targets = ["lint", "test"]
|
||||
targets = ["lint", "test", "unused-media"]
|
||||
}
|
||||
|
||||
target "test" {
|
||||
@@ -40,6 +40,11 @@ target "lint" {
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "unused-media" {
|
||||
target = "unused-media"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
#
|
||||
# releaser targets are defined in _releaser/Dockerfile
|
||||
# and are used for Netlify and AWS S3 deployment
|
||||
|
||||
Reference in New Issue
Block a user