Skip to content

Commit

Permalink
Revert "feat: skip build for APM Server if there are no code changes (e…
Browse files Browse the repository at this point in the history
…lastic#3051)" (elastic#3062)

This reverts commit 2fc87e4.
  • Loading branch information
bmorelli25 committed Sep 11, 2024
1 parent 2fc87e4 commit 1b8c088
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .buildkite/scripts/build_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,8 @@ if [[ "${GITHUB_PR_BASE_REPO}" != 'docs' ]]; then

cd ./product-repo &&
git fetch origin pull/$GITHUB_PR_NUMBER/head:pr_$GITHUB_PR_NUMBER &&
git switch pr_$GITHUB_PR_NUMBER

if [[ "${GITHUB_PR_BASE_REPO}" == 'apm-server' ]]; then
docs_diff=$(git diff --stat "$GITHUB_PR_TARGET_BRANCH"...HEAD -- ./docs ./changelogs CHANGELOG.asciidoc)
else
docs_diff=$(git diff --stat "$GITHUB_PR_TARGET_BRANCH"...HEAD)
fi

if [[ -z $docs_diff ]]; then
echo "${GITHUB_PR_TARGET_BRANCH} in ${GITHUB_PR_BASE_REPO} has no docs changes"
exit 0
fi

echo "diff:"
echo "$docs_diff"

cd ..
git switch pr_$GITHUB_PR_NUMBER &&
cd ..
# For product repos - context in https://github.com/elastic/docs/commit/5b06c2dc1f50208fcf6025eaed6d5c4e81200330
build_args+=" --keep_hash"
build_args+=" --sub_dir $GITHUB_PR_BASE_REPO:$GITHUB_PR_TARGET_BRANCH:./product-repo"
Expand Down

0 comments on commit 1b8c088

Please sign in to comment.