Skip to content

Commit

Permalink
feat: migrate "link-checker-sample-apps" workflow from Screwdriver to…
Browse files Browse the repository at this point in the history
… Github

temporary test with separate branch
  • Loading branch information
esolitos authored and gitbutler-client committed Aug 13, 2024
1 parent 1ff9e32 commit b045122
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 0 additions & 37 deletions screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,6 @@ shared:
ln -sf /opt/vespa-cli_${VESPA_CLI_VERSION}_linux_amd64/bin/vespa /usr/local/bin/
jobs:
link-checker-sample-apps:
requires: [~pr, ~commit]
image: ruby:3.1
annotations:
screwdriver.cd/buildPeriodically: H H(0-5) * * 1-5 # some time between 12:00 AM UTC (midnight) to 5:59 AM UTC Mon-Fri
steps:
- install: |
gem update --system 3.3.3
gem install bundler
export LANG=C.UTF-8
bundle install
- add-front-matter-for-processing: |
find . -not -path './_site/*' -name \*.md | \
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
find . -not -path './_site/*' -name services.xml -or -name hosts.xml -or -name deployment.xml | \
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
find . -not -path './_site/*' -name \*.java -or -not -path './_site/*' -name \*.sd | \
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
- generate-links-from-code-files: |
bundle exec jekyll build -p _plugins-linkcheck
- build-site: |
bundle exec jekyll build
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,"
echo "as well as links in javadoc."
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}' \
--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/' \
--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/' \
--swap-urls '(https\://github.com.*/master/.*)#.*:\1,(https\://github.com.*/main/.*)#.*:\1,^(?!https)(.*)\.md:\1.html' \
_site
verify-billion-scale-vector-search:
requires: [~pr, ~commit]
sourcePaths: ["billion-scale-vector-search/"]
Expand Down

0 comments on commit b045122

Please sign in to comment.