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