Skip to content
Snippets Groups Projects
Verified Commit 7f2ce6dd authored by Huste, Tobias's avatar Huste, Tobias
Browse files

Run link checking with up-to-date htmlproofer version

- get rid of bundler deprecation warning
- remove internal tag from link checker test
parent 3c89c780
No related branches found
No related tags found
1 merge request!131Fix external link checking
......@@ -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"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment