-
Notifications
You must be signed in to change notification settings - Fork 335
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
Set build type for scheduled builds based on doc repo changes #2931
Conversation
A documentation preview will be available soon. Request a new doc build by commenting
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. |
@@ -25,6 +25,9 @@ steps: | |||
value: "" | |||
hint: "Should we ignore checking broken links? Should we allow to run the build without failing if there's a broken link? Ignoring broken links is dangerous not just because bad links will leak into the public site but because subsequent builds and pull requests that do not fix the links fail." | |||
- wait | |||
- label: "Full rebuild or incremental build?" | |||
if: build.source == "schedule" | |||
command: ".buildkite/scripts/compare_commits.sh" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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 onelastic.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!
c3e8250
. Here's the successful run: https://buildkite.com/elastic/docs-build/builds/3589#018d8ce5-6265-4b9d-a8ff-49e0b8c4612a.