From 0662fb72ff127a5f8307a1066b51e445c933c3e2 Mon Sep 17 00:00:00 2001
From: Pascal Osterwinter <pascal.osterwinter@spotgroup.de>
Date: Tue, 23 Aug 2022 11:48:21 +0000
Subject: [PATCH] Add schema-link-checker to docs pipelinet to find broken
 schema links before changes are done.

---
 .gitlab-ci.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 793e052af..f01360d29 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,6 +13,7 @@ include:
 stages:
   - build
   - upload
+  - validate
 
 build:
   stage: build
@@ -67,6 +68,20 @@ upload:production:
     - ssh -o CheckHostIP=no fitko@dorado.uberspace.de mkdir -p docs.fitko.de/fit-connect
     - rsync -rLvz --delete --checksum -e "ssh -o CheckHostIP=no" --ipv4 --progress ./build/. fitko@dorado.uberspace.de:docs.fitko.de/fit-connect
 
+link-check:
+    rules:
+        - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+    stage: validate
+    variables:
+      CRAWLER_URL: https://preview.docs.fitko.dev/fit-connect/$CI_COMMIT_REF_SLUG/
+      CRAWLER_DOMAIN: preview.docs.fitko.dev/fit-connect/$CI_COMMIT_REF_SLUG/
+    needs:
+        - upload:preview
+    trigger:
+        strategy: depend
+        project: fit-connect/schema-link-checker
+        branch: main
+
 stop:preview:
   stage: .post
   image: alpine:latest
-- 
GitLab