diff --git a/.github/workflows/pull-request-management.yml b/.github/workflows/pull-request-management.yml index b725b0269..558cd950c 100644 --- a/.github/workflows/pull-request-management.yml +++ b/.github/workflows/pull-request-management.yml @@ -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 diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 140e6fd84..c242a0e44 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -1,18 +1,4 @@ -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 @@ -20,5 +6,6 @@ services: volumes: - ${PWD}/:/data ports: - - 8000:8000 + - 127.0.0.1:8000:8000 + network_mode: host entrypoint: "sh /data/development/entrypoint.sh" diff --git a/development/entrypoint.sh b/development/entrypoint.sh index 5d9161ddf..587456171 100644 --- a/development/entrypoint.sh +++ b/development/entrypoint.sh @@ -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