Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5546ffb
DOC-2237: correct decommission + maintenance mode guidance (#1735)
Feediver1 Jun 11, 2026
e3a3f42
Add Kubernetes secure bootstrap documentation (#1668)
JakeSCahill Jun 11, 2026
c716a5a
GCP BigLake support in Cloud (#1731)
kbatuigas Jun 11, 2026
6d99a7e
auto-docs: Update @redpanda-data/docs-extensions-and-macros (#1744)
vbotbuildovich Jun 12, 2026
d47c541
Delete add-parent-context-flag.sh (#1732)
JakeSCahill Jun 12, 2026
fe589e2
auto-docs: Update property docs for tag v26.1.10 (#1745)
vbotbuildovich Jun 15, 2026
67d339f
Update setup script URLs from Cloudsmith to linux.pkg.redpanda.com (#…
PrzemekZglinicki Jun 16, 2026
b6e8fa5
Add the Bump proxy for previewing API docs in PRs (#1552)
JakeSCahill Jun 16, 2026
3887de6
Add Linux package repository migration guide (DEVPROD-4222) (#1755)
JakeSCahill Jun 17, 2026
0f04d55
architecture: Don't mention SMP (#1756)
StephanDollberg Jun 17, 2026
9e3a661
manage/k8s: document decommission timing settings (--decommission-wai…
david-yu Jun 24, 2026
bd37fb8
auto-docs: Update @redpanda-data/docs-extensions-and-macros (#1760)
vbotbuildovich Jun 24, 2026
f92907e
manage/rpk: document OAUTHBEARER (OIDC) for Admin API + Schema Regist…
david-yu Jun 24, 2026
0c0a92e
DOC-1732: Document managing Schema Registry ACLs in Console (#1769)
micheleRP Jun 25, 2026
233a8a8
docs: add DESCRIBE_CONFIGS to migrator source topic ACLs (#1770)
twmb Jun 25, 2026
1beb0a1
Fix syntax (#1773)
JakeSCahill Jun 30, 2026
adbe45a
auto-docs: Update property docs for tag v26.1.12 (#1772)
vbotbuildovich Jul 9, 2026
952bd23
Iceberg: Manage access for end users/clients (#1648)
kbatuigas Jul 9, 2026
4c59494
upgrade: document broker restarts during operator upgrades (#1758)
david-yu Jul 10, 2026
103a560
fix(properties): correct topic property name in kafka_batch_max_bytes…
Feediver1 Jul 10, 2026
5c03834
k8s - Create Cloud topics section and Whole Cluster Restore page for …
david-yu Jul 10, 2026
df784f6
Update quota labels for client throughput metric (#1785)
kbatuigas Jul 13, 2026
b95ba71
DOC-2347: give Cloud readers log-free troubleshooting steps for shado…
micheleRP Jul 13, 2026
f42fbd7
State Guaranteed QoS support policy for Kubernetes (#1789)
Feediver1 Jul 13, 2026
309a8e1
Fix fetch_partition_max_bytes default to 5MB in Shadowing setup (#1792)
david-yu Jul 14, 2026
f6da005
Document cross-namespace clusterRef for shadow links in Kubernetes (2…
david-yu Jul 15, 2026
5c4a9f9
auto-docs: Update @redpanda-data/docs-extensions-and-macros (#1783)
vbotbuildovich Jul 15, 2026
a4b7f88
Update wording in partial that describes requirements.adoc (#1791)
Feediver1 Jul 15, 2026
65be1b2
feat: add rpk documentation automation (#1733)
JakeSCahill Jul 17, 2026
08ee0fc
Merge remote-tracking branch 'origin/main' into merge-main-into-beta
JakeSCahill Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
300 changes: 300 additions & 0 deletions .github/workflows/update-rpk-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
name: Update rpk Documentation

on:
workflow_dispatch:
inputs:
version:
description: 'rpk version tag (e.g., v26.2.0, v26.2.0-rc1) or "dev" for latest dev branch. RC versions target beta branch.'
required: true
default: 'dev'
diff_version:
description: 'Previous version for diff (optional, e.g., v26.1.9)'
required: false
draft_missing:
description: 'Generate draft pages for new commands'
required: false
default: 'true'
type: boolean
repository_dispatch:
types: [update-rpk-docs]

permissions:
contents: write
pull-requests: write

jobs:
update-rpk-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout docs repo
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Setup Go
uses: actions/setup-go@v5
with:
# Must match or exceed the version in redpanda/src/go/rpk/go.mod
# Check with: curl -s https://raw.githubusercontent.com/redpanda-data/redpanda/dev/src/go/rpk/go.mod | grep "^go "
go-version: 'stable'

- name: Determine version parameters
id: params
env:
EVENT_NAME: ${{ github.event_name }}
DISPATCH_VERSION: ${{ github.event.client_payload.version }}
DISPATCH_DIFF_VERSION: ${{ github.event.client_payload.diff_version }}
DISPATCH_DRAFT_MISSING: ${{ github.event.client_payload.draft_missing }}
INPUT_VERSION: ${{ github.event.inputs.version }}
INPUT_DIFF_VERSION: ${{ github.event.inputs.diff_version }}
INPUT_DRAFT_MISSING: ${{ github.event.inputs.draft_missing }}
run: |
# Handle workflow_dispatch vs repository_dispatch
if [ "$EVENT_NAME" = "repository_dispatch" ]; then
VERSION="${DISPATCH_VERSION:-dev}"
DIFF_VERSION="${DISPATCH_DIFF_VERSION}"
DRAFT_MISSING="${DISPATCH_DRAFT_MISSING:-false}"
else
VERSION="${INPUT_VERSION}"
DIFF_VERSION="${INPUT_DIFF_VERSION}"
DRAFT_MISSING="${INPUT_DRAFT_MISSING}"
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "diff_version=$DIFF_VERSION" >> $GITHUB_OUTPUT
echo "draft_missing=$DRAFT_MISSING" >> $GITHUB_OUTPUT

# Detect RC versions (e.g., v26.2.0-rc1, 26.2.0-rc2)
if [[ "$VERSION" =~ -rc[0-9]+$ ]]; then
echo "is_rc=true" >> $GITHUB_OUTPUT
echo "base_branch=beta" >> $GITHUB_OUTPUT
else
echo "is_rc=false" >> $GITHUB_OUTPUT
echo "base_branch=main" >> $GITHUB_OUTPUT
fi

# Determine branch name
if [ "$VERSION" = "dev" ]; then
echo "branch_name=rpk-docs-dev-$(date +%Y%m%d)" >> $GITHUB_OUTPUT
else
echo "branch_name=rpk-docs-$VERSION" >> $GITHUB_OUTPUT
fi

- name: Validate RC version against beta branch
if: steps.params.outputs.is_rc == 'true'
id: beta_check
env:
EVENT_NAME: ${{ github.event_name }}
run: |
VERSION="${{ steps.params.outputs.version }}"

# Extract major.minor from version (e.g., v26.2.0-rc1 -> 26.2)
VERSION_MAJOR_MINOR=$(echo "$VERSION" | sed -E 's/^v?([0-9]+\.[0-9]+).*/\1/')

# Get version from beta branch antora.yml
BETA_VERSION=$(git show origin/beta:antora.yml | grep "^version:" | sed -E "s/^version:[[:space:]]*['\"]?([0-9]+\.[0-9]+)['\"]?.*/\1/")

echo "RC version major.minor: $VERSION_MAJOR_MINOR"
echo "Beta branch version: $BETA_VERSION"

if [ "$VERSION_MAJOR_MINOR" != "$BETA_VERSION" ]; then
# RC tags are also cut for patch releases of the current stable line
# (for example v26.1.12-rc1 while beta is 26.2). Those arrive through
# the automated repository_dispatch trigger and are expected, so skip
# quietly instead of failing the run. A manual workflow_dispatch run
# asked for this exact version, so a mismatch there is a real error.
if [ "$EVENT_NAME" = "repository_dispatch" ]; then
echo "::notice::RC version $VERSION targets the $VERSION_MAJOR_MINOR line, not the current beta version ($BETA_VERSION). Skipping docs generation."
echo "skip=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "::error::RC version $VERSION does not match beta branch version $BETA_VERSION"
echo "RC releases must target the current beta version."
exit 1
fi

echo "✓ RC version $VERSION matches beta branch version $BETA_VERSION"

- name: Checkout target branch
if: steps.beta_check.outputs.skip != 'true'
run: |
BASE_BRANCH="${{ steps.params.outputs.base_branch }}"
if [ "$BASE_BRANCH" != "main" ]; then
echo "Checking out $BASE_BRANCH branch for RC release"
git checkout "$BASE_BRANCH"
fi

- name: Resolve diff base version
if: steps.beta_check.outputs.skip != 'true'
id: diffbase
run: |
DIFF_VERSION="${{ steps.params.outputs.diff_version }}"
VERSION="${{ steps.params.outputs.version }}"

# When no diff version is supplied (the usual case for the rpk-release
# repository_dispatch trigger), fall back to the currently-published
# version recorded in antora.yml (full-version). That is the version the
# docs currently target, so it is the correct baseline for "what's new".
if [ -z "$DIFF_VERSION" ]; then
FULL_VERSION=$(grep -E '^\s*full-version:' antora.yml \
| head -1 \
| sed -E "s/.*full-version:[[:space:]]*['\"]?([^'\"[:space:]]+).*/\1/")
if [ -n "$FULL_VERSION" ]; then
DIFF_VERSION="v${FULL_VERSION#v}"
echo "Using antora.yml full-version as diff base: $DIFF_VERSION"
else
echo "Could not read full-version from antora.yml; skipping diff"
fi
else
echo "Using supplied diff version: $DIFF_VERSION"
fi

# Never diff a version against itself.
if [ -n "$DIFF_VERSION" ] && { [ "$DIFF_VERSION" = "$VERSION" ] || [ "$DIFF_VERSION" = "v${VERSION#v}" ]; }; then
echo "Diff base ($DIFF_VERSION) equals the target version; skipping diff"
DIFF_VERSION=""
fi

# The generator diffs against a committed baseline snapshot
# (docs-data/rpk-<version>.json); it does not rebuild the old version
# from source. If the snapshot is missing, skip the diff so the PR does
# not claim a comparison that did not run. The snapshot is written and
# committed on each run, so it is available from the next run onward.
if [ -n "$DIFF_VERSION" ] && [ ! -f "docs-data/rpk-${DIFF_VERSION}.json" ]; then
echo "::warning::No baseline snapshot docs-data/rpk-${DIFF_VERSION}.json found. What's new update and change summary are skipped until a baseline is committed."
DIFF_VERSION=""
fi

echo "diff_version=$DIFF_VERSION" >> $GITHUB_OUTPUT

- name: Build rpk-docs command
if: steps.beta_check.outputs.skip != 'true'
id: command
run: |
# Build command - builds rpk from source using Go
CMD="npx doc-tools generate rpk-docs"

VERSION="${{ steps.params.outputs.version }}"
CMD="$CMD --ref $VERSION"

DIFF_VERSION="${{ steps.diffbase.outputs.diff_version }}"
if [ -n "$DIFF_VERSION" ]; then
# A diff is required for the What's new update and the change summary.
CMD="$CMD --diff $DIFF_VERSION"
CMD="$CMD --update-whats-new"
fi

DRAFT_MISSING="${{ steps.params.outputs.draft_missing }}"
if [ "$DRAFT_MISSING" = "true" ]; then
CMD="$CMD --draft-missing"
fi

CMD="$CMD --output-dir modules/reference/pages/rpk"
# Write the generator's own (richer) PR summary outside the repo tree so
# it is not committed into the generated PR.
CMD="$CMD --summary-file ${{ runner.temp }}/pr-summary.md"
echo "cmd=$CMD" >> $GITHUB_OUTPUT

- name: Run rpk-docs generator
if: steps.beta_check.outputs.skip != 'true'
id: generate
run: |
echo "Running: ${{ steps.command.outputs.cmd }}"
# Log outside the repo tree so it is not committed into the generated PR.
${{ steps.command.outputs.cmd }} 2>&1 | tee "${{ runner.temp }}/generation-output.txt"

- name: Check for changes
if: steps.beta_check.outputs.skip != 'true'
id: changes
run: |
git add -A
if git diff --staged --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "Changed files:"
git diff --staged --name-only | head -20
fi

- name: Generate PR description
if: steps.beta_check.outputs.skip != 'true' && steps.changes.outputs.has_changes == 'true'
id: pr_body
env:
PR_BODY: ${{ runner.temp }}/pr-body.md
PR_SUMMARY: ${{ runner.temp }}/pr-summary.md
WHATS_NEW: modules/get-started/pages/release-notes/redpanda.adoc
run: |
VERSION="${{ steps.params.outputs.version }}"
DIFF_VERSION="${{ steps.diffbase.outputs.diff_version }}"

# Header
cat > "$PR_BODY" << 'HEADER'
## Summary

Automated update of rpk CLI documentation.

HEADER

# Version info
if [ "$VERSION" = "dev" ]; then
echo "**Source**: \`dev\` branch (pre-release)" >> "$PR_BODY"
else
echo "**Version**: \`$VERSION\`" >> "$PR_BODY"
fi

if [ -n "$DIFF_VERSION" ]; then
echo "**Diff against**: \`$DIFF_VERSION\`" >> "$PR_BODY"
fi
echo "" >> "$PR_BODY"

# Call out the What's new update when the generator touched it.
if git diff --staged --name-only | grep -q "$WHATS_NEW"; then
echo "> :memo: Updated the What's new page (\`$WHATS_NEW\`) with the Redpanda CLI changes." >> "$PR_BODY"
echo "" >> "$PR_BODY"
fi

# Detailed, maintained change summary produced by the generator
# (generation stats, change tables, command lists, and validation report).
if [ -f "$PR_SUMMARY" ]; then
cat "$PR_SUMMARY" >> "$PR_BODY"
echo "" >> "$PR_BODY"
fi

# Footer
cat >> "$PR_BODY" << 'FOOTER'
## Automation

Generated by [rpk-docs automation](https://github.com/redpanda-data/docs-extensions-and-macros/tree/main/tools/rpk-docs).

Review the changes and merge when ready.
FOOTER

- name: Create Pull Request
if: steps.beta_check.outputs.skip != 'true' && steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.params.outputs.branch_name }}
base: ${{ steps.params.outputs.base_branch }}
title: "docs: update rpk CLI documentation (${{ steps.params.outputs.version }})"
body-path: ${{ runner.temp }}/pr-body.md
commit-message: "docs: update rpk CLI documentation for ${{ steps.params.outputs.version }}"
delete-branch: true
labels: |
documentation
automated

- name: No changes detected
if: steps.beta_check.outputs.skip != 'true' && steps.changes.outputs.has_changes == 'false'
run: |
echo "No documentation changes detected for version ${{ steps.params.outputs.version }}"
71 changes: 71 additions & 0 deletions .github/workflows/validate-docs-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Validate docs-data files
on:
pull_request:
paths:
- 'docs-data/rpk-overrides.json'
- 'docs-data/rpk-overrides.schema.json'
- 'docs-data/property-overrides.json'
push:
branches: [main]
paths:
- 'docs-data/rpk-overrides.json'
- 'docs-data/rpk-overrides.schema.json'
- 'docs-data/property-overrides.json'

jobs:
validate-rpk-overrides:
name: Validate rpk-overrides.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install AJV CLI
run: npm install -g ajv-cli ajv-formats

- name: Validate rpk-overrides.json against schema
run: |
echo "Validating docs-data/rpk-overrides.json against docs-data/rpk-overrides.schema.json..."
ajv validate \
--spec=draft2020 \
-s docs-data/rpk-overrides.schema.json \
-d docs-data/rpk-overrides.json \
-c ajv-formats \
--strict=false \
--all-errors

- name: Schema validation passed
if: success()
run: echo "rpk-overrides.json validates successfully against the schema."

validate-property-overrides:
name: Validate property-overrides.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate property-overrides.json syntax
run: |
echo "Checking docs-data/property-overrides.json is valid JSON..."
if jq empty docs-data/property-overrides.json 2>/dev/null; then
echo "property-overrides.json is valid JSON."
else
echo "::error::property-overrides.json contains invalid JSON syntax"
exit 1
fi

- name: Check for required fields
run: |
echo "Checking property-overrides.json structure..."
# Verify it's an object with expected top-level keys
if jq -e 'type == "object"' docs-data/property-overrides.json > /dev/null; then
echo "property-overrides.json has correct structure."
else
echo "::error::property-overrides.json must be a JSON object"
exit 1
fi
Loading
Loading