diff --git a/.buildkite/build_pr_pipeline.yml b/.buildkite/build_pr_pipeline.yml index 3c5225b9ef6c..f7023abc34b9 100644 --- a/.buildkite/build_pr_pipeline.yml +++ b/.buildkite/build_pr_pipeline.yml @@ -1,9 +1,9 @@ env: - USE_HTTPS_CLONE: true + USE_HTTPS_CLONE: false steps: - - key: "cancel-existing-builds" - command: ".buildkite/scripts/cancel_running_pr.sh || true" + #- key: "cancel-existing-builds" + # command: ".buildkite/scripts/cancel_running_pr.sh || true" - key: "build-pr-setup" label: "setup" command: ".buildkite/scripts/build_pr_commit_status.sh pending" diff --git a/.buildkite/scripts/build_pr.sh b/.buildkite/scripts/build_pr.sh index c16344e1e942..39cdd321c338 100755 --- a/.buildkite/scripts/build_pr.sh +++ b/.buildkite/scripts/build_pr.sh @@ -3,8 +3,8 @@ set -euo pipefail set +x # This script should only be invoked by the Buildkite PR bot -if [ -z ${GITHUB_PR_BRANCH+set} ] || [ -z ${GITHUB_PR_TARGET_BRANCH+set} ] || [ -z ${GITHUB_PR_NUMBER+set} ] || [ -z ${GITHUB_PR_BASE_REPO+set} ];then - echo "One of the following env. variable GITHUB_PR_BRANCH, GITHUB_PR_TARGET_BRANCH, GITHUB_PR_NUMBER, GITHUB_PR_BASE_REPO is missing - exiting." +if [ -z ${GITHUB_PR_TARGET_BRANCH+set} ] || [ -z ${GITHUB_PR_NUMBER+set} ] || [ -z ${GITHUB_PR_BASE_REPO+set} ];then + echo "One of the following env. variable GITHUB_PR_TARGET_BRANCH, GITHUB_PR_NUMBER, GITHUB_PR_BASE_REPO is missing - exiting." exit 1 fi @@ -51,8 +51,8 @@ if [[ "${GITHUB_PR_BASE_REPO}" != 'docs' ]]; then git@github.com:elastic/$GITHUB_PR_BASE_REPO.git ./product-repo cd ./product-repo && - git fetch origin pull/$GITHUB_PR_NUMBER/head:$GITHUB_PR_BRANCH && - git switch $GITHUB_PR_BRANCH && + git fetch origin pull/$GITHUB_PR_NUMBER/head:pr_$GITHUB_PR_NUMBER && + git switch pr_$GITHUB_PR_NUMBER && cd .. # For product repos - context in https://github.com/elastic/docs/commit/5b06c2dc1f50208fcf6025eaed6d5c4e81200330 build_args+=" --keep_hash"