From 2e3fe6e00e0009136fb8d933e2fd61caad681ade Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Tue, 13 Aug 2024 15:34:51 +0200 Subject: [PATCH] feat: migrate "link-checker-sample-apps" workflow from Screwdriver to Github temporary test with separate branch --- .github/workflows/link-checker.yml | 38 ++++++++++++++++++++++++++++++ screwdriver.yaml | 11 +++++---- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/link-checker.yml diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml new file mode 100644 index 000000000..3fab681d8 --- /dev/null +++ b/.github/workflows/link-checker.yml @@ -0,0 +1,38 @@ +name: Link checker + +on: + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + schedule: + - cron: "00 3 * * 1-5" + +jobs: + test: + uses: vespa-engine/gh-actions/.github/workflows/jekyll-link-checker.yml@remove-redirect-files-before-link-check + with: + additional-args: "--directory-index-file README.html" + add-no-render-with-liquid: "true" + build-plugins: | + _plugins-linkcheck + pre-check-script: | + mv links-to-check.html _site + echo "Broken links in links-to-check.html are extracted from services/hosts/deployment.xml in the sample apps, as well as links in javadoc." + echo "Search for broken links in these files." + ignore-files: |- + /tensor-playground/src/main/resources/playground/ + /src/main/resources/site/index.html/ + /dense-passage-retrieval-with-ann/src/main/resources/frontend/index.html/ + ignore-urls: |- + src/main/application/schemas/wiki.sd#L80 + /localhost:8080/ + src/main/application/search/query-profiles + /hub.docker.com/r/vespaengine/vespa/tags/ + swap-urls: |- + (https\://github.com.*/master/.*)#.*:\1 + (https\://github.com.*/main/.*)#.*:\1 + ^(?!https)(.*)\.md:\1.html diff --git a/screwdriver.yaml b/screwdriver.yaml index 6685fae1e..221d0b1c0 100644 --- a/screwdriver.yaml +++ b/screwdriver.yaml @@ -48,13 +48,16 @@ jobs: echo "Search for broken links in these files." - check-links: | bundle exec htmlproofer \ - --assume-extension --check-html --no-check-external-hash --no-enforce-http \ - --typhoeus '{"connecttimeout": 10, "timeout": 30, "accept_encoding": "zstd,br,gzip,deflate"}' \ - --hydra '{"max_concurrency": 1}' \ + --assume-extension \ + --check-html \ --directory-index-file README.html \ - --ignore-urls 'src/main/application/schemas/wiki.sd#L80,/localhost:8080/,src/main/application/search/query-profiles,/hub.docker.com/r/vespaengine/vespa/tags/' \ + --hydra '{"max_concurrency": 1}' \ --ignore-files '/tensor-playground/src/main/resources/playground/,/src/main/resources/site/index.html/,/dense-passage-retrieval-with-ann/src/main/resources/frontend/index.html/' \ + --ignore-urls 'src/main/application/schemas/wiki.sd#L80,/localhost:8080/,src/main/application/search/query-profiles,/hub.docker.com/r/vespaengine/vespa/tags/' \ + --no-check-external-hash \ + --no-enforce-http \ --swap-urls '(https\://github.com.*/master/.*)#.*:\1,(https\://github.com.*/main/.*)#.*:\1,^(?!https)(.*)\.md:\1.html' \ + --typhoeus '{"connecttimeout": 10, "timeout": 30, "accept_encoding": "zstd,br,gzip,deflate"}' \ _site verify-billion-scale-vector-search: