Skip to content

Commit

Permalink
Use bigger instance type for the full doc rebuild (#2889)
Browse files Browse the repository at this point in the history
* Use bigger intance type for full rebuilds of the main doc job

* Wire build machine type to build pipeline
  • Loading branch information
nkammah authored Jan 12, 2024
1 parent f916b78 commit e6dfc67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .buildkite/build_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ steps:
agents:
provider: "gcp"
image: family/docs-ubuntu-2204
machineType: ${BUILD_MACHINE_TYPE}
- wait
- key: "branch-comparison"
label: "Compare branches"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/build_pr_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
agents:
provider: "gcp"
image: family/docs-ubuntu-2204
machineType: ${BUILD_PR_MACHINE_TYPE}
machineType: ${BUILD_MACHINE_TYPE}
- key: "teardown"
label: "teardown"
command: |
Expand Down
6 changes: 4 additions & 2 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function retry {
return 0
}

export BUILD_PR_MACHINE_TYPE="n2-standard-4"
export BUILD_MACHINE_TYPE="n2-standard-4"

# Secrets must be redacted
# https://buildkite.com/docs/pipelines/managing-log-output#redacted-environment-variables
Expand All @@ -31,6 +31,8 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-build-pr" ]];then
export BUILDKITE_API_TOKEN=$(retry 5 vault kv get -field=value secret/ci/elastic-docs/buildkite_token)
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"
export BUILD_MACHINE_TYPE="n2-highcpu-32"
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "docs-build" ]];then
export BUILD_MACHINE_TYPE="n2-highcpu-32"
fi

0 comments on commit e6dfc67

Please sign in to comment.