Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Amirault <mamirault@gitlab.com>2020-11-13 18:04:50 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2020-11-13 18:04:50 +0300
commit8084afe2bac645aadf104568fc96c1ae1a3b0267 (patch)
treebf98f7c34aef932b4609ed72c916a15f2334eaeb /dockerfiles
parent1495bb1e6aacd7389155ca48ecaddd221ea0efd7 (diff)
Dedicate a lint image to just docs tests (vale/markdownlint/etc)
Diffstat (limited to 'dockerfiles')
-rw-r--r--dockerfiles/Dockerfile.gitlab-docs-lint-markdown47
1 files changed, 47 insertions, 0 deletions
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