Skip to content

Commit

Permalink
Revert "Bk use pat for commit statuses" (#2914)
Browse files Browse the repository at this point in the history
* Revert "Bk use pat for commit statuses"

* Move secrets where they belong
  • Loading branch information
nkammah authored Jan 29, 2024
1 parent 080b767 commit beed787
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .buildkite/build_pr_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
env:
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"
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-build-pr" ]];then
# Docs PR require a full rebuild - so let's boost the builds so they don't take 2 hours
export BUILD_MACHINE_TYPE="n2-highcpu-32"
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-preview-cleaner" ]];then
export GITHUB_TOKEN=$(retry 5 vault kv get -field=value secret/ci/elastic-docs/docs_preview_cleaner)
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-build" ]];then
export BUILD_MACHINE_TYPE="n2-highcpu-32"
fi
3 changes: 0 additions & 3 deletions .buildkite/preview_cleaner_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
env:
USE_HTTPS_CLONE: true

steps:
- label: ":white_check_mark: Preview cleaning"
command: ".buildkite/scripts/clean_preview_branches.sh"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/build_pr_commit_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "Setting commit status: buildkite/${BUILDKITE_PIPELINE_SLUG} - ${status_sta
curl -s -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${VAULT_GITHUB_TOKEN}" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"${githubPublishStatus}" \
-d "${data}"
3 changes: 1 addition & 2 deletions .buildkite/scripts/clean_preview_branches.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

set -eo pipefail

export [email protected]:elastic/built-docs.git
Expand All @@ -13,7 +12,7 @@ ssh-agent bash -c '
-v ~/.ssh/known_hosts:/root/.ssh/known_hosts:cached,ro \
-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK:cached,ro \
-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
-e GITHUB_TOKEN=$VAULT_GITHUB_TOKEN \
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-v /opt/git-mirrors:/opt/git-mirrors:cached,ro \
-e CACHE_DIR=/opt/git-mirrors \
$IMAGE node /docs_build/preview/clean.js $REPO'

0 comments on commit beed787

Please sign in to comment.