docs(testing): document link-checker binary release process
Add comprehensive documentation for maintainers on how to: - Create releases in docs-tooling (automated) - Manually distribute binaries to docs-v2 (required for private repo) - Update workflow references when needed This addresses the missing process documentation for link-checker binary distribution between the two repositories. feat(ci): update link-checker to v1.2.2 and add manual sync workflow - Update pr-link-check.yml to use link-checker-v1.2.2 with latest fixes - Add sync-link-checker-binary.yml for manual binary distribution - Improvements in v1.2.2: base URL detection, anchor validation, JSON parsing The v1.2.2 release fixes the Hugo base URL detection issue and improves anchor link validation that was tested in this PR.pull/6302/head
parent
ddb9a5584d
commit
cba3b21f1c
|
@ -95,7 +95,7 @@ jobs:
|
|||
curl -L -H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-o link-checker-info.json \
|
||||
"https://api.github.com/repos/influxdata/docs-v2/releases/tags/link-checker-v1.0.0"
|
||||
"https://api.github.com/repos/influxdata/docs-v2/releases/tags/link-checker-v1.2.2"
|
||||
|
||||
# Extract download URL for linux binary
|
||||
DOWNLOAD_URL=$(jq -r '.assets[] | select(.name | test("link-checker.*linux")) | .url' link-checker-info.json)
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
name: Sync Link Checker Binary from docs-tooling
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Link checker version to sync (e.g., v1.2.2)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
sync-binary:
|
||||
name: Sync link-checker binary from docs-tooling
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download binary from docs-tooling release
|
||||
run: |
|
||||
echo "Downloading link-checker ${{ inputs.version }} from docs-tooling..."
|
||||
|
||||
# Download binary from docs-tooling release
|
||||
curl -L -H "Accept: application/octet-stream" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-o link-checker-linux-x86_64 \
|
||||
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-${{ inputs.version }}/link-checker-linux-x86_64"
|
||||
|
||||
# Download checksums
|
||||
curl -L -H "Accept: application/octet-stream" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-o checksums.txt \
|
||||
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-${{ inputs.version }}/checksums.txt"
|
||||
|
||||
# Verify downloads
|
||||
ls -la link-checker-linux-x86_64 checksums.txt
|
||||
|
||||
- name: Create docs-v2 release
|
||||
run: |
|
||||
echo "Creating link-checker-${{ inputs.version }} release in docs-v2..."
|
||||
|
||||
gh release create \
|
||||
--title "Link Checker Binary ${{ inputs.version }}" \
|
||||
--notes "Link validation tooling binary for docs-v2 GitHub Actions workflows.
|
||||
|
||||
This binary is distributed from the docs-tooling repository release link-checker-${{ inputs.version }}.
|
||||
|
||||
### Usage in GitHub Actions
|
||||
|
||||
The binary is automatically downloaded by docs-v2 workflows for link validation.
|
||||
|
||||
### Manual Usage
|
||||
|
||||
\`\`\`bash
|
||||
# Download and make executable
|
||||
curl -L -o link-checker https://github.com/influxdata/docs-v2/releases/download/link-checker-${{ inputs.version }}/link-checker-linux-x86_64
|
||||
chmod +x link-checker
|
||||
|
||||
# Verify installation
|
||||
./link-checker --version
|
||||
\`\`\`
|
||||
|
||||
### Changes in ${{ inputs.version }}
|
||||
|
||||
See the [docs-tooling release](https://github.com/influxdata/docs-tooling/releases/tag/link-checker-${{ inputs.version }}) for detailed changelog." \
|
||||
link-checker-${{ inputs.version }} \
|
||||
link-checker-linux-x86_64 \
|
||||
checksums.txt
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
41
TESTING.md
41
TESTING.md
|
@ -171,6 +171,47 @@ cargo build --release
|
|||
cp target/release/link-checker /usr/local/bin/
|
||||
```
|
||||
|
||||
#### Binary Release Process
|
||||
|
||||
**For maintainers:** To create a new link-checker release in docs-v2:
|
||||
|
||||
1. **Create release in docs-tooling** (builds and releases binary automatically):
|
||||
```bash
|
||||
cd docs-tooling
|
||||
git tag link-checker-v1.2.x
|
||||
git push origin link-checker-v1.2.x
|
||||
```
|
||||
|
||||
2. **Manually distribute to docs-v2** (required due to private repository access):
|
||||
```bash
|
||||
# Download binary from docs-tooling release
|
||||
curl -L -H "Authorization: Bearer $(gh auth token)" \
|
||||
-o link-checker-linux-x86_64 \
|
||||
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-v1.2.x/link-checker-linux-x86_64"
|
||||
|
||||
curl -L -H "Authorization: Bearer $(gh auth token)" \
|
||||
-o checksums.txt \
|
||||
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-v1.2.x/checksums.txt"
|
||||
|
||||
# Create docs-v2 release
|
||||
gh release create \
|
||||
--repo influxdata/docs-v2 \
|
||||
--title "Link Checker Binary v1.2.x" \
|
||||
--notes "Link validation tooling binary for docs-v2 GitHub Actions workflows." \
|
||||
link-checker-v1.2.x \
|
||||
link-checker-linux-x86_64 \
|
||||
checksums.txt
|
||||
```
|
||||
|
||||
3. **Update workflow reference** (if needed):
|
||||
```bash
|
||||
# Update .github/workflows/pr-link-check.yml line 98 to use new version
|
||||
sed -i 's/link-checker-v[0-9.]*/link-checker-v1.2.x/' .github/workflows/pr-link-check.yml
|
||||
```
|
||||
|
||||
> [!Note]
|
||||
> The manual distribution is required because docs-tooling is a private repository and the default GitHub token doesn't have cross-repository access for private repos.
|
||||
|
||||
#### Core Commands
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in New Issue