Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update offline link check #713

Merged
merged 3 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,30 +230,34 @@ jobs:
if: needs.file-changes.outputs.docs == 'true'
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: 'start docker-compose stack'
- uses: actions/checkout@v4
- name: 'start docker compose stack'
run: |
docker-compose -f development/docker-compose.yml up -d webdoc_cvp
docker-compose -f development/docker-compose.yml ps
docker compose -f development/docker-compose.yml up -d webdoc_cvp
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_cvp raviqqe/muffet:2.6.1 http://127.0.0.1:8000 \
-e ".*fonts.googleapis.com.*" \
-e ".*fonts.gstatic.com.*" \
-e ".*edit.*" \
-e ".*aristanetworks.force.com.*" \
-e ".*https://s3.amazonaws.com/onelogin-sourcemaps/.*" \
-e "twitter.com" \
-f --buffer-size=8192 \
--color=always \
--skip-tls-verification \
--timeout=30
- name: 'stop docker-compose stack'
docker run --network container:webdoc_cvp 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
docker compose -f development/docker-compose.yml down

ansible_test:
name: Run ansible-test validation
Expand Down
17 changes: 2 additions & 15 deletions development/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
version: "3"
services:
ansible:
image: avdteam/base:3.8-v2.0
container_name: ansible_avd
environment:
- AVD_GIT_USER=${GIT_USER}
- AVD_GIT_EMAIL=${GIT_EMAIL}
volumes:
- ./../../:/projects:delegated
- /var/run/docker.sock:/var/run/docker.sock
- ${HOME}/.gitconfig:/home/avd/.gitconfig
- ${HOME}/.ssh:/home/avd/.ssh/
command: [ "/bin/sh", "-c", "while true; do sleep 30; done;" ]

webdoc_cvp:
image: python:3.11.0-alpine3.17
container_name: webdoc_cvp
working_dir: /data
volumes:
- ${PWD}/:/data
ports:
- 8000:8000
- 127.0.0.1:8000:8000
network_mode: host
entrypoint: "sh /data/development/entrypoint.sh"
2 changes: 1 addition & 1 deletion development/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ pip install -r ansible_collections/arista/cvp/docs/requirements.txt --upgrade

# Start mkdocs
echo "Starting mkdocs"
mkdocs serve --no-livereload --dev-addr=0.0.0.0:8000 -f mkdocs.yml
mkdocs serve --no-livereload --dev-addr=127.0.0.1:8000 -f mkdocs.yml
Loading