-
Notifications
You must be signed in to change notification settings - Fork 347
feature/build only branches with legacy asciidoc #3233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/build only branches with legacy asciidoc #3233
Conversation
A documentation preview will be available soon.
Request a new doc build by commenting
- Rebuild this PR:
run docs-build - Rebuild this PR and all Elastic docs:
run docs-build rebuild
run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.
22eeebd to
705d25e
Compare
The buildkite/docs-build-pr status check is required in some repos. This way it will stay green
shainaraskas
commented
Jun 20, 2025
We have other docs sets that are not on stack versioning that wouldn't be caught in this fix. This would help a lot with certain repos but I wonder if it needs to be refactored to cover stuff like ECE 4+ and ECK 3+
I'm trying to think through Shaina's comment. We could potentially pair Jan's change here with the repo-specific instructions that start on L68. We could write a script to parse conf.yaml and spit out a mapping of each repo and the versions of documentation that are contained within that repo. We could then check against those versions.
For example:
# repositories with a docs dir and changelog "apm-aws-lambda" | "apm-agent-android" | "apm-agent-nodejs" | "apm-agent-python" | "apm-agent-ruby" | "apm-agent-rum-js" | "apm-agent-go" | "apm-agent-java" | "apm-agent-dotnet" | "apm-agent-php" | "apm-agent-ios") + if ! [[ $GITHUB_PR_TARGET_BRANCH =~ {NEWREGEXHERE} ]]; then + echo "Target branch '$GITHUB_PR_TARGET_BRANCH' is not a valid version branch (must be in format + X.Y where X <= 8)" + exit 0 + fi git fetch origin "$GITHUB_PR_TARGET_BRANCH" docs_diff=$(git diff --stat "origin/$GITHUB_PR_TARGET_BRANCH"...HEAD -- "./docs/**.asciidoc" CHANGELOG.asciidoc) ;;
(this is just to illustrate)
Uh oh!
There was an error while loading. Please reload this page.
Changes
Only build 8.x target branches.
Context
According to https://github.com/elastic/buildkite-pr-bot?tab=readme-ov-file#configuration-1 you can actually set the
target_branchinpull-requests.org-wide.json.However, the
buildkite/docs-build-prstatus check is usually a required check.In this PR we exit early if the target branch doesn't match the pattern, so that the status check will still be green.