From e1151858313d247700db197339ff3b34e5471a63 Mon Sep 17 00:00:00 2001 From: bmorelli25 Date: Thu, 8 Feb 2024 12:46:32 -0800 Subject: [PATCH 1/2] check if docs repo has changed --- .buildkite/build_pipeline.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.buildkite/build_pipeline.yml b/.buildkite/build_pipeline.yml index d68c6db6d3f76..ae6697734ccca 100644 --- a/.buildkite/build_pipeline.yml +++ b/.buildkite/build_pipeline.yml @@ -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 rebuild?" + 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." + export REBUILD="rebuild" + else + echo "The docs repo has not changed since the last build." + export REBUILD="" + fi + - wait - label: ":white_check_mark: Build docs" command: | export REBUILD="$(buildkite-agent meta-data get REBUILD --default '' --log-level fatal)" From 41c79715985ed0275633ef517525861042717687 Mon Sep 17 00:00:00 2001 From: bmorelli25 Date: Thu, 8 Feb 2024 12:51:36 -0800 Subject: [PATCH 2/2] more --- .buildkite/build_pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/build_pipeline.yml b/.buildkite/build_pipeline.yml index ae6697734ccca..270d17bb1afd6 100644 --- a/.buildkite/build_pipeline.yml +++ b/.buildkite/build_pipeline.yml @@ -25,17 +25,17 @@ 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 rebuild?" + - 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." - export REBUILD="rebuild" + buildkite-agent meta-data set "REBUILD" "rebuild" else echo "The docs repo has not changed since the last build." - export REBUILD="" + buildkite-agent meta-data set "REBUILD" "" fi - wait - label: ":white_check_mark: Build docs"