Skip to content

Commit

Permalink
docs: Don't lint external links when running in CI (#12058)
Browse files Browse the repository at this point in the history
Original behaviour did not take effect in CI due to a different entrypoint.

This restores the original behaviour (which will link external links when using make -C build.assets test-docs) but disables the external linting in CI for reliability.

Updates #11940
  • Loading branch information
webvictim committed Apr 19, 2022
1 parent d3e54f0 commit 4e2bd46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .cloudbuild/ci/doc-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
steps:
- name: quay.io/gravitational/next:main
id: docs-test
env:
- WITH_EXTERNAL_LINKS=true
entrypoint: /bin/bash
dir: /src
args:
- -c
- ln -s /workspace /src/content && yarn markdown-lint-external-links
args:
- -c
- ln -s /workspace /src/content && yarn markdown-lint
timeout: 10m
4 changes: 2 additions & 2 deletions build.assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,5 @@ docsbox:
.PHONY: test-docs
test-docs: DOCS_VERSION := $(shell grep -E ^VERSION $(MAKEFILE_ROOT_DIR)/Makefile | cut -d= -f2 | cut -d. -f1-2)
test-docs: docsbox
docker run --platform=linux/amd64 -i $(NOROOT) -v $$(pwd)/..:/src/content $(DOCSBOX) \
/bin/sh -c "yarn markdown-lint"
docker run --platform=linux/amd64 -i $(NOROOT) -v $$(pwd)/..:/src/content/$(DOCS_VERSION) $(DOCSBOX) \
/bin/sh -c "yarn markdown-lint-external-links"

0 comments on commit 4e2bd46

Please sign in to comment.