From 9f85f87d42db5e37c63be5b070df6b13bb48dd17 Mon Sep 17 00:00:00 2001 From: Craig Box Date: Wed, 28 May 2025 14:29:09 +1200 Subject: [PATCH 1/2] mark 1.25 as archived --- data/args.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/args.yml b/data/args.yml index bd55c15b9973..eb51c46aef36 100644 --- a/data/args.yml +++ b/data/args.yml @@ -17,12 +17,12 @@ copyright_year: 2025 # when archive=true, we're building for archive.istio.io # when archive_landing=true, we're building the landing page for archive.istio.io preliminary: false -archive: false +archive: true archive_landing: false # When archive=true above, these values must be filled in -archive_date: YYYY-MM-DD -archive_search_refinement: "V1.1" +archive_date: 2025-05-08 +archive_search_refinement: "V1.25" # GitHub branch names used when the docs have links to GitHub source_branch_name: release-1.25 From fc820f2431cca2d9a70119c27f1f52588bba47fc Mon Sep 17 00:00:00 2001 From: Craig Box Date: Thu, 29 May 2025 10:30:45 +1200 Subject: [PATCH 2/2] Update lint script for archive sites --- scripts/lint_site.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/lint_site.sh b/scripts/lint_site.sh index d538a6b237ec..f3165e55b72b 100755 --- a/scripts/lint_site.sh +++ b/scripts/lint_site.sh @@ -17,6 +17,14 @@ set -e FAILED=0 +ARCHIVE=0 + +# If the archive flag is set, we allow links to `/latest/` that won't exist +# at the time of linting, but will exist when the archive is copied to the +# current serving branch. +if grep -q "^archive: true" data/args.yml 2>/dev/null; then + ARCHIVE=1 +fi if [[ "$#" -ne 0 ]]; then LANGS="$*" @@ -204,13 +212,16 @@ if [ -d ./public ]; then printf -v ignore_files "/^.\/public\/%s/," "${SKIP_LANGS[@]}"; ignore_files="${ignore_files%,}" fi echo "Running linkinator..." - if [[ ${CHECK_EXTERNAL_LINKS:-} == "true" ]]; then + if [[ ${ARCHIVE:-} -eq 1 ]]; then + if ! linkinator public/ -r -s 'github.com localhost:3000 localhost:5601 localhost:8001 localhost:9080 localhost:9081 en.wikipedia.org my-istio-logs-database.io ^((?!localhost).)*$ /latest/' --silent --concurrency 25; then + FAILED=1 + fi + elif [[ ${CHECK_EXTERNAL_LINKS:-} == "true" ]]; then if ! linkinator public/ -r -s 'github.com localhost:3000 localhost:5601 localhost:8001 localhost:9080 localhost:9081 en.wikipedia.org my-istio-logs-database.io' --silent --concurrency 25; then FAILED=1 fi else - #TODO: Remove .../workload-selector/ from ignored links. PRs take a long time to get through istio/api, and a link is broken from there. Once this PR is complete, remove it: https://github.com/istio/api/pull/1405 - if ! linkinator public/ -r -s 'github.com localhost:3000 localhost:5601 localhost:8001 localhost:9080 localhost:9081 en.wikipedia.org my-istio-logs-database.io ^((?!localhost).)*$ /docs/reference/config/type/v1beta1/workload-selector/' --silent --concurrency 25; then + if ! linkinator public/ -r -s 'github.com localhost:3000 localhost:5601 localhost:8001 localhost:9080 localhost:9081 en.wikipedia.org my-istio-logs-database.io ^((?!localhost).)*$' --silent --concurrency 25; then FAILED=1 fi fi