Make build_pr script more specific#3183
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. |
.buildkite/scripts/build_pr.sh
Outdated
| "elasticsearch") | ||
| git fetch origin "$GITHUB_PR_TARGET_BRANCH" | ||
| docs_diff=$(git diff --stat "origin/$GITHUB_PR_TARGET_BRANCH"...HEAD -- ./buildSrc ./build-tools-internal ./build-tools/src/main/resources ./client ./docs ./modules/reindex/src/internalClusterTest/java/org/elasticsearch/client/documentation ./modules/reindex/src/test/java/org/elasticsearch/client/documentation ./plugins/examples ./server/src/internalClusterTest/java/org/elasticsearch/client/documentation ./server/src/main/resources/org/elasticsearch/common ./server/src/test/java/org/elasticsearch/client/documentation ./x-pack/docs ./x-pack/plugin/esql/qa/testFixtures/src/main/resources ./x-pack/plugin/sql/qa ./x-pack/qa/sql) | ||
| docs_diff=$(git diff --stat "origin/$GITHUB_PR_TARGET_BRANCH"...HEAD -- ./buildSrc ./build-tools-internal ./build-tools/src/main/resources ./client ./docs/**/*.asciidoc ./modules/reindex/src/internalClusterTest/java/org/elasticsearch/client/documentation ./modules/reindex/src/test/java/org/elasticsearch/client/documentation ./plugins/examples ./server/src/internalClusterTest/java/org/elasticsearch/client/documentation ./server/src/main/resources/org/elasticsearch/common ./server/src/test/java/org/elasticsearch/client/documentation ./x-pack/docs ./x-pack/plugin/esql/qa/testFixtures/src/main/resources ./x-pack/plugin/sql/qa ./x-pack/qa/sql) |
There was a problem hiding this comment.
@leemthompo I'm not sure if we should update any of the other directories in this list to be more specific. Any ideas?
There was a problem hiding this comment.
Really not sure, but might want to add **/*.asciidoc to the other docs paths to be consistent with your other changes? :)
|
@florent-leborgne I don't see a specific command for |
build_pr script more specificbuild_pr script more specific
I can confirm it always runs and makes some people complain every now and then 😅 |
|
Ok. This is unblocked now thanks to #3186 working in the latest commit in elastic/ecs-logging#88. @bmorelli25 do you have any concerns about updating all these at once? 😬 Hopefully not too many commits are being pushed to update AsciiDoc files, but I'm a little concerned that one of these could be wrong and could prevent the check from running and cause a build failure. Am I being overly cautious? |
build_pr script more specificbuild_pr script more specific
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
Follow up to #3182
Only run the docs PR preview job when an AsciiDoc file is edited.
Note: This is an imperfect solution because it would not build if only an image was updated in a PR, but that might be ok at this point. 🤷