Skip to content

Commit b045122

Browse files
esolitosgitbutler-client
authored andcommitted
feat: migrate "link-checker-sample-apps" workflow from Screwdriver to Github
temporary test with separate branch
1 parent 1ff9e32 commit b045122

File tree

2 files changed

+38
-37
lines changed

2 files changed

+38
-37
lines changed

.github/workflows/link-checker.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Link checker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: "00 3 * * 1-5"
13+
14+
jobs:
15+
test:
16+
uses: vespa-engine/gh-actions/.github/workflows/jekyll-link-checker.yml@remove-redirect-files-before-link-check
17+
with:
18+
additional-args: "--directory-index-file README.html"
19+
add-no-render-with-liquid: "true"
20+
build-plugins: |
21+
_plugins-linkcheck
22+
pre-check-script: |
23+
mv links-to-check.html _site
24+
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."
25+
echo "Search for broken links in these files."
26+
ignore-files: |-
27+
/tensor-playground/src/main/resources/playground/
28+
/src/main/resources/site/index.html/
29+
/dense-passage-retrieval-with-ann/src/main/resources/frontend/index.html/
30+
ignore-urls: |-
31+
src/main/application/schemas/wiki.sd#L80
32+
/localhost:8080/
33+
src/main/application/search/query-profiles
34+
/hub.docker.com/r/vespaengine/vespa/tags/
35+
swap-urls: |-
36+
(https\://github.com.*/master/.*)#.*:\1
37+
(https\://github.com.*/main/.*)#.*:\1
38+
^(?!https)(.*)\.md:\1.html

screwdriver.yaml

-37
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,6 @@ shared:
2020
ln -sf /opt/vespa-cli_${VESPA_CLI_VERSION}_linux_amd64/bin/vespa /usr/local/bin/
2121
2222
jobs:
23-
link-checker-sample-apps:
24-
requires: [~pr, ~commit]
25-
image: ruby:3.1
26-
annotations:
27-
screwdriver.cd/buildPeriodically: H H(0-5) * * 1-5 # some time between 12:00 AM UTC (midnight) to 5:59 AM UTC Mon-Fri
28-
steps:
29-
- install: |
30-
gem update --system 3.3.3
31-
gem install bundler
32-
export LANG=C.UTF-8
33-
bundle install
34-
- add-front-matter-for-processing: |
35-
find . -not -path './_site/*' -name \*.md | \
36-
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
37-
find . -not -path './_site/*' -name services.xml -or -name hosts.xml -or -name deployment.xml | \
38-
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
39-
find . -not -path './_site/*' -name \*.java -or -not -path './_site/*' -name \*.sd | \
40-
while read f; do (echo -e "---\nrender_with_liquid: false\n---\n"; cat ${f})>${f}.new; mv ${f}.new ${f}; done
41-
- generate-links-from-code-files: |
42-
bundle exec jekyll build -p _plugins-linkcheck
43-
- build-site: |
44-
bundle exec jekyll build
45-
mv links-to-check.html _site
46-
echo "Broken links in links-to-check.html are extracted from services/hosts/deployment.xml in the sample apps,"
47-
echo "as well as links in javadoc."
48-
echo "Search for broken links in these files."
49-
- check-links: |
50-
bundle exec htmlproofer \
51-
--assume-extension --check-html --no-check-external-hash --no-enforce-http \
52-
--typhoeus '{"connecttimeout": 10, "timeout": 30, "accept_encoding": "zstd,br,gzip,deflate"}' \
53-
--hydra '{"max_concurrency": 1}' \
54-
--directory-index-file README.html \
55-
--ignore-urls 'src/main/application/schemas/wiki.sd#L80,/localhost:8080/,src/main/application/search/query-profiles,/hub.docker.com/r/vespaengine/vespa/tags/' \
56-
--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/' \
57-
--swap-urls '(https\://github.com.*/master/.*)#.*:\1,(https\://github.com.*/main/.*)#.*:\1,^(?!https)(.*)\.md:\1.html' \
58-
_site
59-
6023
verify-billion-scale-vector-search:
6124
requires: [~pr, ~commit]
6225
sourcePaths: ["billion-scale-vector-search/"]

0 commit comments

Comments
 (0)