From 8084afe2bac645aadf104568fc96c1ae1a3b0267 Mon Sep 17 00:00:00 2001 From: Marcel Amirault Date: Fri, 13 Nov 2020 15:04:50 +0000 Subject: Dedicate a lint image to just docs tests (vale/markdownlint/etc) --- dockerfiles/Dockerfile.gitlab-docs-lint-markdown | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 dockerfiles/Dockerfile.gitlab-docs-lint-markdown (limited to 'dockerfiles') diff --git a/dockerfiles/Dockerfile.gitlab-docs-lint-markdown b/dockerfiles/Dockerfile.gitlab-docs-lint-markdown new file mode 100644 index 00000000..29e4f6ba --- /dev/null +++ b/dockerfiles/Dockerfile.gitlab-docs-lint-markdown @@ -0,0 +1,47 @@ +############################ +# +# Image that contains the doc lint tools. +# +############################ + +# ALPINE_VERSION is defined in .gitlab-ci.yml +ARG ALPINE_VERSION + +FROM alpine:${ALPINE_VERSION} +MAINTAINER GitLab Technical Writing team + +# VALE_VERSION and MARKDOWNLINT_VERSION are defined in .gitlab-ci.yml +ARG VALE_VERSION +ARG MARKDOWNLINT_VERSION + +# Install dependencies +RUN apk add --no-cache -U \ + bash \ + build-base \ + curl \ + git \ + gnupg \ + grep \ + libc6-compat \ + libcurl \ + libxslt \ + libxslt-dev \ + nodejs \ + openssl \ + pngquant \ + tar \ + yarn + +# Install vale +RUN curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v${VALE_VERSION} + +# Set up needed environment variables that are called with --build-arg when +# the Docker image is built (see .gitlab-ci.yml). +ARG CI_COMMIT_REF_NAME +# If CI_COMMIT_REF_NAME is not set (local development), set it to master +ENV CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME:-master} + +WORKDIR /tmp + +# markdownlint-cli pinned to control when new versions are put in place. +RUN yarn global add markdownlint-cli@${MARKDOWNLINT_VERSION} && yarn cache clean -- cgit v1.2.3