Skip to content

Use bigger CI machine for docs repo #2840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buildkite/build_pr_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ steps:
agents:
provider: "gcp"
image: family/docs-ubuntu-2204
machineType: ${BUILD_PR_MACHINE_TYPE}
- key: "teardown"
label: "teardown"
command: |
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ function retry {
return 0
}

export BUILD_PR_MACHINE_TYPE="n2-standard-4"

# Secrets must be redacted
# https://buildkite.com/docs/pipelines/managing-log-output#redacted-environment-variables
if [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-build-pr" ]];then
export GITHUB_TOKEN=$(retry 5 vault kv get -field=value secret/ci/elastic-docs/docs_preview_cleaner)

if [[ ${GITHUB_PR_BASE_REPO:="unset"} == "docs" ]]; then
# Docs PR require a full rebuild - so let's boost the builds so they don't take 2 hours
export BUILD_PR_MACHINE_TYPE="n2-highcpu-32"
fi
fi
2 changes: 1 addition & 1 deletion .buildkite/scripts/build_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else
# books for PRs to the docs repo, for now.
# When https://github.com/elastic/docs/issues/1823 is fixed, this
# should be removed and the original behavior restored.
rebuild_opt=" --rebuild"
rebuild_opt=" --rebuild --procs 16"
fi


Expand Down