fix(docs): publish cross-stand index links

This commit is contained in:
“Naeel”
2026-09-03 17:39:24 +03:00
parent bba6b47dc2
commit a222a0dace
2 changed files with 20 additions and 1 deletions
@@ -0,0 +1,17 @@
# Fix cross-stand links publication
## Cause
The source change was present in `TOOLS/docs-generator/internal/writers/writers.go`, but `TOOLS/bin/docs-generator` was an older compiled binary. TEST generation therefore continued to produce an index without the links. The build validator also incorrectly treated intentional links to other documentation roots as contamination.
## Fix and verification
- Rebuilt `TOOLS/bin/docs-generator` from the current Go source.
- Updated the validator to allow links to the DEV, TEST, and PROD documentation roots while still rejecting foreign API, dashboard, and provider values.
- Regenerated and built DEV, TEST, and PROD sequentially.
- Published one `index.html` to each active VM mirror and verified the `Другие стенды` block remotely:
- `/var/www/tf-docs/nubes-dev/index.html`
- `/var/www/tf-docs/nubes-test/index.html`
- `/var/www/tf-docs/nubes/index.html`
The S3 mirror still reports `unexpected EOF`; direct VM transfer was used for the verified publication.
+3 -1
View File
@@ -211,7 +211,9 @@ PY
nubes-test) foreign_namespace="nubes-dev"; foreign_api="lk-api-gateway\.ngcloud\.ru|lk-api-gateway-dev\.ngcloud\.ru"; foreign_dashboard="deck\.ngcloud\.ru|deck-dev\.ngcloud\.ru" ;;
*) echo "Error: unsupported namespace for documentation validation: $NAMESPACE" >&2; exit 2 ;;
esac
if grep -RInE "$foreign_namespace|$foreign_api|$foreign_dashboard|registry\.kube5s\.ru" "$MKDOCS_DOCS_DIR" --include='*.md' >/tmp/docs-stand-contamination.txt 2>/dev/null; then
if grep -RIlE "$foreign_namespace|$foreign_api|$foreign_dashboard|registry\.kube5s\.ru" "$MKDOCS_DOCS_DIR" --include='*.md' 2>/dev/null | while IFS= read -r docs_file; do
grep -vE 'https://tf-docs\.nodejsk8s\.dev\.nubes\.ru/(nubes-dev|nubes-test|nubes)/' "$docs_file" | grep -nE "$foreign_namespace|$foreign_api|$foreign_dashboard|registry\.kube5s\.ru" && printf '%s\n' "$docs_file"
done >/tmp/docs-stand-contamination.txt; then
echo "Error: stand-specific contamination detected in generated docs:" >&2
cat /tmp/docs-stand-contamination.txt >&2
exit 2