Skip to content

Conversation

@bmorelli25
Copy link
Member

@bmorelli25 bmorelli25 commented Feb 9, 2024

Summary

In #2929, we reverted to incremental builds run every 30 minutes. This works great, until a PR is merged to the elastic/docs repository. Almost every PR merged in this repo requires a rebuild in order for the changes to take effect on elastic.co/guide/*.

This PR updates our scheduled builds to first check to see if the build commit of elastic/docs has changed since the previous successful, scheduled run. If the commit has changed, we run a full docs rebuild to ensure the elastic/docs changes are propagated to all corners of elastic.co/guide. If the commit hasn't changed, there's no need for a full rebuild, and we instead run an incremental build—the faster and cheaper option.

Testing

Testing this PR is fun and easy!

@github-actions
Copy link

github-actions bot commented Feb 9, 2024

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.

@bmorelli25 bmorelli25 marked this pull request as ready for review February 9, 2024 15:57
@bmorelli25 bmorelli25 requested a review from a team as a code owner February 9, 2024 15:57
@bmorelli25 bmorelli25 changed the title Test conditional builds Set build type for scheduled builds based on doc repo changes Feb 9, 2024
- wait
- label: "Full rebuild or incremental build?"
if: build.source == "schedule"
command: ".buildkite/scripts/compare_commits.sh"
Copy link
Member Author

@bmorelli25 bmorelli25 Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkammah why does L30 not need bash in the command but L35 does?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We specify the script interpreter in the first line of the script here - that's what we call the "shebang". If the script is executable (ex. running "chmod a+x" on it), the pipeline will know how to call it.

As for the discrepancy on L35, it could be legacy, or that we explicitly specified it at the time. Both approaches will work.

@nkammah nkammah merged commit 84035af into master Feb 9, 2024
@nkammah nkammah deleted the test-conditional-builds branch February 9, 2024 19:00
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