Skip to content
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

Conditionally run rebuild or incremental build #2930

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .buildkite/build_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ 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: |
LAST_BUILD_COMMIT=$(buildkite-agent meta get last_build_commit)
CURRENT_COMMIT=$(git rev-parse HEAD)
if [[ "$CURRENT_COMMIT" != "$LAST_BUILD_COMMIT" ]]; then
echo "The docs repo has changed since the last build."
buildkite-agent meta-data set "REBUILD" "rebuild"
else
echo "The docs repo has not changed since the last build."
buildkite-agent meta-data set "REBUILD" ""
fi
- wait
- label: ":white_check_mark: Build docs"
command: |
export REBUILD="$(buildkite-agent meta-data get REBUILD --default '' --log-level fatal)"
Expand Down