From a8515da1afe0b5458a61fe3e7f4b181183e29899 Mon Sep 17 00:00:00 2001 From: nassimkammah Date: Sun, 28 Jan 2024 19:31:21 +0100 Subject: [PATCH 1/3] Fix product repo PR checkout --- .buildkite/scripts/build_pr.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/scripts/build_pr.sh b/.buildkite/scripts/build_pr.sh index c16344e1e9429..39cdd321c338f 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" From 47a144e82479db44c5d1347e8e61d856556b3eba Mon Sep 17 00:00:00 2001 From: nassimkammah Date: Mon, 29 Jan 2024 09:43:46 +0100 Subject: [PATCH 2/3] disable cancelling running PRs --- .buildkite/build_pr_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/build_pr_pipeline.yml b/.buildkite/build_pr_pipeline.yml index 3c5225b9ef6c7..fad3ef20db9ec 100644 --- a/.buildkite/build_pr_pipeline.yml +++ b/.buildkite/build_pr_pipeline.yml @@ -2,8 +2,8 @@ env: USE_HTTPS_CLONE: true 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" From 3e7dffb128a6d1ce81ccd3d265e95d7c28d8f0d4 Mon Sep 17 00:00:00 2001 From: nassimkammah Date: Mon, 29 Jan 2024 09:44:12 +0100 Subject: [PATCH 3/3] disable use https flag --- .buildkite/build_pr_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/build_pr_pipeline.yml b/.buildkite/build_pr_pipeline.yml index fad3ef20db9ec..f7023abc34b99 100644 --- a/.buildkite/build_pr_pipeline.yml +++ b/.buildkite/build_pr_pipeline.yml @@ -1,5 +1,5 @@ env: - USE_HTTPS_CLONE: true + USE_HTTPS_CLONE: false steps: #- key: "cancel-existing-builds"