mirror of
https://github.com/docker/docs.git
synced 2026-06-19 07:35:16 +00:00
chore: fail on hugo warns and remove redundant validation
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -80,7 +80,6 @@ jobs:
|
||||
- unused-media
|
||||
- test-go-redirects
|
||||
- dockerfile-lint
|
||||
- path-warnings
|
||||
- validate-vendor
|
||||
steps:
|
||||
-
|
||||
|
||||
+8
-13
@@ -50,7 +50,14 @@ ARG HUGO_ENV="development"
|
||||
ARG DOCS_URL="https://docs.docker.com"
|
||||
ENV HUGO_CACHEDIR="/tmp/hugo_cache"
|
||||
RUN --mount=type=cache,target=/tmp/hugo_cache \
|
||||
hugo --gc --minify -e $HUGO_ENV -b $DOCS_URL
|
||||
hugo \
|
||||
--gc \
|
||||
--minify \
|
||||
--panicOnWarning \
|
||||
--printPathWarnings \
|
||||
--printUnusedTemplates \
|
||||
-b $DOCS_URL \
|
||||
-e $HUGO_ENV
|
||||
RUN ./hack/flatten-and-resolve.js public
|
||||
|
||||
# lint lints markdown files
|
||||
@@ -145,18 +152,6 @@ RUN apk add --no-cache fd ripgrep
|
||||
WORKDIR /test
|
||||
RUN --mount=type=bind,target=. ./hack/test/unused_media
|
||||
|
||||
# path-warnings checks for duplicate target paths
|
||||
FROM build-base AS path-warnings
|
||||
RUN hugo --printPathWarnings > ./path-warnings.txt
|
||||
RUN <<EOT
|
||||
DUPLICATE_TARGETS=$(grep "Duplicate target paths" ./path-warnings.txt)
|
||||
if [ ! -z "$DUPLICATE_TARGETS" ]; then
|
||||
echo "$DUPLICATE_TARGETS"
|
||||
echo "You probably have a duplicate alias defined. Please check your aliases."
|
||||
exit 1
|
||||
fi
|
||||
EOT
|
||||
|
||||
# pagefind installs the Pagefind runtime
|
||||
FROM base AS pagefind
|
||||
ARG PAGEFIND_VERSION
|
||||
|
||||
+1
-6
@@ -40,7 +40,7 @@ target "release" {
|
||||
}
|
||||
|
||||
group "validate" {
|
||||
targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint", "path-warnings", "validate-vendor"]
|
||||
targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint", "validate-vendor"]
|
||||
}
|
||||
|
||||
target "test" {
|
||||
@@ -80,11 +80,6 @@ target "dockerfile-lint" {
|
||||
call = "check"
|
||||
}
|
||||
|
||||
target "path-warnings" {
|
||||
target = "path-warnings"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
#
|
||||
# releaser targets are defined in hack/releaser/Dockerfile
|
||||
# and are used for AWS S3 deployment
|
||||
|
||||
Reference in New Issue
Block a user