diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index ffef022a9afdcca291d3e2f105fd589742e35fd8..abaeb9fddcd9f08212994cf063de2b0929657ee8 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -93,7 +93,7 @@ docs-lint links: stage: lint needs: [] script: - - lychee --offline --include-fragments doc + - lychee --offline --no-progress --include-fragments doc ui-docs-links lint: extends: diff --git a/doc/administration/gitaly/recovery.md b/doc/administration/gitaly/recovery.md index ec59b854a686af7effaee1996937e52387645ed7..225ce2c5980327b722a2e3f02165a1fc21582a49 100644 --- a/doc/administration/gitaly/recovery.md +++ b/doc/administration/gitaly/recovery.md @@ -246,7 +246,7 @@ random, fully up-to-date replica of the repository on another healthy Gitaly nod replication job is scheduled only if there are no other replication jobs pending for the target repository. -The reconciliation frequency can be changed via the configuration. The value can be any valid +The reconciliation frequency can be changed through the configuration. The value can be any valid [Go duration value](https://pkg.go.dev/time#ParseDuration). Values below 0 disable the feature. Examples: diff --git a/doc/ci/docker/index.md b/doc/ci/docker/index.md index ea5318dd0570eb87932e957fce4a4e5eed6c215e..2f64edf52851f7f97ffeb9f30178c609e70db72a 100644 --- a/doc/ci/docker/index.md +++ b/doc/ci/docker/index.md @@ -10,7 +10,7 @@ DETAILS: **Tier:** Free, Premium, Ultimate **Offering:** GitLab.com, Self-managed, GitLab Dedicated -There are two primary ways to incorporate [Docker](https://www.docker.com) into your CI/CD workflow: +You can incorporate [Docker](https://www.docker.com) into your CI/CD workflow in two primary ways: - **[Run your CI/CD jobs](using_docker_images.md) in Docker containers.** diff --git a/doc/development/pipelines/index.md b/doc/development/pipelines/index.md index 26f69247e1f0793af3a4f2a2f13f3e6e02cd7ec4..723462ad28600f100534e62a14931795292d5454 100644 --- a/doc/development/pipelines/index.md +++ b/doc/development/pipelines/index.md @@ -268,7 +268,7 @@ We don't have a specific number, but we need to have better numbers for flaky te ## Faster feedback for some merge requests -### Broken Master Fixes +### Broken `master` Fixes When you need to [fix a broken `master`](https://handbook.gitlab.com/handbook/engineering/workflow/#resolution-of-broken-master), you can add the `pipeline::expedited` label to expedite the pipelines that run on the merge request. diff --git a/lefthook.yml b/lefthook.yml index 407960c62235995f33cc610ed4f33c95b921ebc3..dea02a8b0c86c80938986235e2cf32926585e8ff 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -79,6 +79,11 @@ pre-push: files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD glob: 'data/deprecations/*.yml' run: echo "Changes to deprecation files detected. Checking deprecations..\n"; bundle exec rake gitlab:docs:check_deprecations + docs-link-check: + tags: documentation + files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD + glob: 'doc/*.md' + run: scripts/lint-docs-link-check.sh db-schema-changes: tags: database files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD diff --git a/scripts/lint-docs-link-check.sh b/scripts/lint-docs-link-check.sh new file mode 100755 index 0000000000000000000000000000000000000000..51c6ad985c5fc9e44e5b9e5a2ec42c4e37d91657 --- /dev/null +++ b/scripts/lint-docs-link-check.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eo pipefail + +COLOR_ERROR="\e[31m" +COLOR_INFO="\e[32m" +COLOR_WARN="\e[33m" +COLOR_RESET="\e[39m" + +# shellcheck disable=2059 +if command -v lychee > /dev/null; then + printf "${COLOR_INFO}INFO: Lychee found! Checking documentation links...${COLOR_RESET}\n" + if lychee --offline --no-progress --include-fragments doc; then + printf "${COLOR_INFO}INFO: Documentation link test passed!${COLOR_RESET}\n" + else + printf "${COLOR_ERROR}ERROR: Documentation link test failed!${COLOR_RESET}\n" + exit 1 + fi +else + printf "${COLOR_WARN}WARN: Lychee not found! For more information, see <https://lychee.cli.rs/installation/>.${COLOR_RESET}\n" +fi