Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Update link validation script (#3228)
Browse files Browse the repository at this point in the history
* Exclude all directories from link check except install-gde

* Ignore small number of files with broken internal links

* Remove cloud directory from ignore list

* Add broken link for Jenkins test

* Remove begin-rescue block so that htmlproofer fails and aborts when encountering broken links

* Set encoding to resolve Jenkins error

* Remove encdoing; it didn't resolve Jenkins error

* Ignore broken external broken links

* Fix ingore typo and eliminate caching

* Add the links_no_report back and add cicd task for link checking without report

* Fix broken test link
  • Loading branch information
jeff-matthews authored Nov 2, 2018
1 parent 6016140 commit bf73a78
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ end

group :jekyll_plugins do
gem 'jekyll-algolia', '~> 1.0'
end
end
6 changes: 3 additions & 3 deletions rakelib/proofer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def options
checks_to_ignore: ["ScriptCheck", "ImageCheck"],
allow_hash_ref: true,
alt_ignore: [/.*/],
file_ignore: [/videos/, /swagger/, /guides\/m1x/, /search.html/, /404.html/, /codelinks/, /magento-third-party.html/, /magento-techbull.html/, /magento-release-notes.html/, /index.html/, /template.html/, /magento-devdocs-whatsnew.html/],
url_ignore: [/guides\/v2.0/],
file_ignore: [/videos/, /swagger/, /guides\/m1x/, /search.html/, /404.html/, /codelinks/, /magento-third-party.html/, /magento-techbull.html/, /magento-release-notes.html/, /index.html/, /template.html/, /magento-devdocs-whatsnew.html/, /action-groups.html/, /css-preprocess.html/, /es-overview.html/, /cloud-fastly.html/, /theme_dictionary.html/, /contributing.html/],
url_ignore: [/guides\/v2.0/, /architecture/, /advanced-erpoting/, /coding-standards/, /comp-mgr/, /config-guide/, /contributor-guide/, /design-styleguide/, /ext-best-practices/, /extension-dev-guide/, /frontend-dev-guide/, /get-started/, /graphql/, /howdoi/, /inventory/, /javascript-dev-guide/, /marketplace/, /magento-functional-testing-framework/, /migration/, /modules/, /mrg/, /mtf/, /pattern-library/, /payments-integrations/, /performance-best-practices/, /release-notes/, /rest/, /soap/, /test/, /ui-components/, /ui_comp_guide/, /pwa/, /msi/, /mftf/, /github.com/, /www.thegeekstuff.com/, /account.magento.com/, /yatil.net/, /ui-library/, /security/, /navigation/, /community/, /docs.magento.com/, /mariadb.com/],
error_sort: :desc, # Sort by invalid link instead of affected file path (default). This makes it easier to see how many files the broken link affects.
parallel: { :in_processes => 3 },
typhoeus: { :followlocation => true, :connecttimeout => 10, :timeout => 30 },
hydra: { :max_concurrency => 50 },
cache: { :timeframe => '30d' }
# cache: { :timeframe => '30d' }
}
end

Expand Down
9 changes: 9 additions & 0 deletions rakelib/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ namespace :test do
desc "Build devdocs and check for broken links"
task links: %w[build links_no_build]

desc "Check the existing _site for broken links on Jenkins"
task :cicd do

puts 'Checking links with htmlproofer...'.magenta

HTMLProofer.check_directory("_site", options).run

end

desc "Check the existing _site for broken links"
task :links_no_build do

Expand Down

0 comments on commit bf73a78

Please sign in to comment.