Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Jun 19, 2025

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_branch in pull-requests.org-wide.json.

However, the buildkite/docs-build-pr status 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.

@reakaleek reakaleek requested a review from a team as a code owner June 19, 2025 22:38
Copy link

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.

@reakaleek reakaleek force-pushed the feature/build-only-branches-with-legacy-asciidoc branch from 22eeebd to 705d25e Compare June 19, 2025 22:41
The buildkite/docs-build-pr status check is required in some repos. This way it will stay green
@reakaleek reakaleek requested a review from a team June 19, 2025 22:47
@shainaraskas
Copy link
Contributor

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+

@bmorelli25
Copy link
Member

bmorelli25 commented Jun 20, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants