Skip to content

Fix docs-build-pr not triggering on elastic/docs PRs#3332

Merged
cotti merged 1 commit intomasterfrom
fix/buildkite-docs-build-pr-trigger
May 4, 2026
Merged

Fix docs-build-pr not triggering on elastic/docs PRs#3332
cotti merged 1 commit intomasterfrom
fix/buildkite-docs-build-pr-trigger

Conversation

@Mpdreamz
Copy link
Copy Markdown
Member

@Mpdreamz Mpdreamz commented May 3, 2026

Problem

The docs-build-pr Buildkite pipeline has a branch filter configured to only allow master. All other repos use job 0 which has always_trigger_branch: master — so builds always trigger against the master branch and pass the filter.

The standalone elastic/docs entry (job 1) has no always_trigger_branch, so the pr-bot triggers against the PR's feature branch, which the pipeline filter silently rejects. No build, no GitHub check.

Note: This change affects elastic/docs only. All other repositories (elastic/elasticsearch, elastic/kibana, etc.) use a separate job (job 0) with always_trigger_branch: master and are not affected by this change.

Why it appeared to work before

Previously, builds appeared to trigger because the doc-preview GitHub Actions workflow posts a comment on every new PR containing the text `run docs-build`. The old trigger_comment_regex had no ^/$ anchors, so it matched any comment containing "run docs-build" — accidentally triggering a build via the comment path.

Tightening the regex with anchors in #3327 correctly stopped that partial match, but also removed the only mechanism that was making it work.

Fix

Add ignore_pipeline_branch_filters: true to job 1. This tells the Buildkite API to bypass the pipeline's branch filter when triggering, allowing build_on_commit and comment triggers to work as intended per the buildkite-pr-bot design.

Security is still enforced by allow_org_users: true and allowed_repo_permissions: [admin, write] — external contributors cannot trigger builds.

Testing

After merge, verify that PR #3331 (test/buildkite-docs-build-pr-trigger) shows a buildkite/docs-build-pr check on the next push or buildkite test this comment.

The docs-build-pr pipeline has a branch filter in Buildkite that only
allows master. All other repos in job 0 use always_trigger_branch:master
so they always build against master and pass the filter. The standalone
elastic/docs job (job 1) has no always_trigger_branch, so the pr-bot
triggers against the PR's feature branch which the pipeline filter
silently rejects.

Previously builds appeared to work because the doc-preview GitHub Actions
workflow posts a comment containing the text "run docs-build", which
accidentally matched the old unanchored trigger_comment_regex. Tightening
the regex with ^ and $ anchors (#3327) inadvertently removed that
accidental trigger.

Setting ignore_pipeline_branch_filters: true tells the Buildkite API to
bypass the pipeline's branch filter, allowing build_on_commit and comment
triggers to work as intended per the buildkite-pr-bot design.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Mpdreamz Mpdreamz requested a review from a team as a code owner May 3, 2026 19:38
@Mpdreamz Mpdreamz requested a review from cotti May 3, 2026 19:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

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.

@cotti cotti merged commit 838300a into master May 4, 2026
4 checks passed
@cotti cotti deleted the fix/buildkite-docs-build-pr-trigger branch May 4, 2026 16:26
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.

2 participants