From 7f2ce6ddcbfbb18c5163e29bd490d3d1392d90d6 Mon Sep 17 00:00:00 2001
From: Tobias Huste <t.huste@hzdr.de>
Date: Fri, 4 Dec 2020 08:25:15 +0100
Subject: [PATCH] Run link checking with up-to-date htmlproofer version

- get rid of bundler deprecation warning
- remove internal tag from link checker test
---
 .gitlab-ci.yml | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a75fa3009..c705af8c5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,12 +28,14 @@ stages:
 .common_production: &production_before_script
   before_script:
     - gem install bundler --no-document
-    - bundle install --jobs $(nproc) --without test "${FLAGS[@]}"
+    - bundle config set without 'test'
+    - bundle install --jobs $(nproc)
   <<: *cache_production
 
 .common_latest: &latest_before_script
   before_script:
     - "[[ -f \"Gemfile.lock\" ]] && rm Gemfile.lock"
+    - bundle config set without 'test'
     - bundle install --jobs $(nproc) --without test "${FLAGS[@]}"
     - bundle update --jobs $(nproc) "${FLAGS[@]}"
   <<: *cache_latest
@@ -74,9 +76,6 @@ stages:
   stage: test
   variables:
     <<: *common_variables
-    HTMLPROOFER_VERSION: 3.13.0
-    YAMLLINT_VERSION: 0.0.7
-    GIT_STRATEGY: none
   before_script:
     # Installing, generating and exporting locale because htmlproofer needs it.
     # Locale is not set in "standard" docker containers.
@@ -88,15 +87,15 @@ stages:
       export LANG=en_US.UTF-8 && \
       export LANGUAGE=en_US:en && \
       export LC_ALL=en_US.UTF-8"
-    - gem install html-proofer -v $HTMLPROOFER_VERSION --no-document
-    - gem install yaml-lint -v $YAMLLINT_VERSION --no-document
+    - gem install bundler --no-document
+    - bundle install --jobs $(nproc)
   script:
-    - "htmlproofer \
+    - "bundle exec htmlproofer \
         --internal-domains localhost:4000 \
         --disable-external \
         --assume-extension public/"
     # Use yaml-lint tool to check yaml files.
-    - "yaml-lint _data/ _config.yml"
+    - "bundle exec yaml-lint _data/ _config.yml"
   <<: *cache_production
   # https://docs.gitlab.com/ce/ci/yaml/#interruptible
   interruptible: true
@@ -159,8 +158,9 @@ test:htmlproofer:external_links:
     - build:production
   needs: ["build:production"]
   script:
-    - "htmlproofer \
+    - "bundle exec htmlproofer \
         --internal-domains localhost:4000 \
+        --url-ignore 'https://www.openstoragenetwork.org/'
         --assume-extension public/"
   rules:
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
-- 
GitLab