-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Move offline links checker to daily scheduled workflow (#3801)
- Loading branch information
Showing
2 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: "Check links offline for dead targets" | ||
|
||
on: | ||
# schedule every day at 3 AM on devel | ||
schedule: | ||
- cron: "0 3 * * *" | ||
# Allow for manual trigger on the selected branch in UI | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
offline_link_check: | ||
name: 'Validate mkdoc content' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Start docker-compose stack' | ||
run: | | ||
docker-compose -f development/docker-compose.yml up -d webdoc_avd | ||
docker-compose -f development/docker-compose.yml ps | ||
- name: 'Test connectivity to mkdoc server' | ||
run: | | ||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:8000)" != "200" ]]; do sleep 5; done' | ||
- name: Check links for 404 | ||
run: | | ||
docker run --network container:webdoc_avd raviqqe/muffet:2.10.1 http://127.0.0.1:8000/ -f \ | ||
--buffer-size 8192 \ | ||
--exclude ".*fonts.googleapis.com.*" \ | ||
--exclude ".*fonts.gstatic.com.*" \ | ||
--exclude ".*tools.ietf.org.*" \ | ||
--exclude ".*edit.*" \ | ||
--exclude ".*docs.github.com.*" \ | ||
--exclude "twitter.com" \ | ||
--exclude "www.docker.com" \ | ||
--exclude "hub.docker.com" \ | ||
--exclude "tech-library.arista.com" \ | ||
--max-connections-per-host 30 \ | ||
--max-redirections 3 \ | ||
--rate-limit 1 \ | ||
--timeout 30 | ||
- name: 'Stop docker-compose stack' | ||
run: | | ||
docker-compose -f development/docker-compose.yml down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,44 +93,6 @@ jobs: | |
# Do NOT set a name for the pre-commit-ci action. Otherwise the Github App will not pick it up. | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() | ||
# ----------------------------------- # | ||
# Check Links offline for dead target | ||
# ----------------------------------- # | ||
offline_link_check: | ||
name: 'Validate mkdoc content' | ||
runs-on: ubuntu-latest | ||
needs: [ file-changes ] | ||
if: needs.file-changes.outputs.docs == 'true' | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Start docker-compose stack' | ||
run: | | ||
docker-compose -f development/docker-compose.yml up -d webdoc_avd | ||
docker-compose -f development/docker-compose.yml ps | ||
- name: 'Test connectivity to mkdoc server' | ||
run: | | ||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:8000)" != "200" ]]; do sleep 5; done' | ||
- name: Check links for 404 | ||
run: | | ||
docker run --network container:webdoc_avd raviqqe/muffet:2.10.1 http://127.0.0.1:8000/ -f \ | ||
--buffer-size 8192 \ | ||
--exclude ".*fonts.googleapis.com.*" \ | ||
--exclude ".*fonts.gstatic.com.*" \ | ||
--exclude ".*tools.ietf.org.*" \ | ||
--exclude ".*edit.*" \ | ||
--exclude ".*docs.github.com.*" \ | ||
--exclude "twitter.com" \ | ||
--exclude "www.docker.com" \ | ||
--exclude "hub.docker.com" \ | ||
--exclude "tech-library.arista.com" \ | ||
--max-connections-per-host 30 \ | ||
--max-redirections 3 \ | ||
--rate-limit 1 \ | ||
--timeout 30 | ||
- name: 'Stop docker-compose stack' | ||
run: | | ||
docker-compose -f development/docker-compose.yml down | ||
|
||
# ----------------------------------- # | ||
# Test Requirements | ||
|