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:
authorAchilleas Pipinellis <axil@gitlab.com>2022-11-30 13:20:34 +0300
committerMarcel Amirault <mamirault@gitlab.com>2022-11-30 13:20:34 +0300
commit4472ddd373fd7f3d8b64503fb6a016f09f15d9d0 (patch)
treea345d50ee87996d2ba6ffd2db9029d0c050b1cf1
parent66eb8edd5fbb4ba7eae6782337db819ce3821957 (diff)
Duplicate global nav tests for upstream projects
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/test.gitlab-ci.yml18
2 files changed, 21 insertions, 1 deletions
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 02b1aa12..00ff5458 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -116,6 +116,10 @@ default:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/'
+.rules_upstream_global_nav_test:
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "trigger"'
+
.rules_prod:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml
index 631ca898..52e4118b 100644
--- a/.gitlab/ci/test.gitlab-ci.yml
+++ b/.gitlab/ci/test.gitlab-ci.yml
@@ -3,7 +3,7 @@
###############################################
#
-# Test the links in the global nav
+# Test the links in the global nav for all MRs in `gitlab-docs`
#
test_global_nav_links:
image: registry.gitlab.com/gitlab-org/gitlab-docs/lint-html:alpine-3.16-ruby-2.7.6-0088e238
@@ -19,6 +19,22 @@ test_global_nav_links:
- "parallel time bundle exec nanoc check ::: internal_links internal_anchors"
#
+# Test the links in the global nav for review apps for upstream projects
+#
+upstream_test_global_nav_links:
+ image: registry.gitlab.com/gitlab-org/gitlab-docs/lint-html:alpine-3.16-ruby-2.7.6-0088e238
+ extends:
+ - .rules_upstream_global_nav_test
+ - .bundle
+ stage: test
+ script:
+ # Only check files in top-level directories. This means a much faster and less repetitive check of global navigation links.
+ - echo " all:" >> nanoc.yaml
+ - echo " exclude_files:" >> nanoc.yaml
+ - echo " - '\/(ee|runner|omnibus|charts|operator)\/.*\/.*'" >> nanoc.yaml
+ - "parallel time bundle exec nanoc check ::: internal_links internal_anchors"
+
+#
# Check the redirect file for duplicates
#
check_duplicate_redirects: