Skip to content
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

Use env vars to set large/small jobs #323

Merged
merged 2 commits into from
Dec 15, 2024
Merged
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
31 changes: 22 additions & 9 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ env:
IMAGE_TAG: ${BUILDKITE_BUILD_NUMBER}-${BUILDKITE_COMMIT:0:8}
SONAR_HOST: https://sonarcloud.io
GOFLAGS: -buildvcs=false
LARGE_RUNNER_QUEUE: self-hosted-garage-vms
SMALL_RUNNER_QUEUE: self-hosted-garage-vms
RUNNER_LARGE: "large"
RUNNER_SMALL: "small"

steps:
- group: ":knife: Pre-check"
Expand All @@ -13,7 +17,8 @@ steps:
- label: ":golang: go generate"
key: "generate"
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
cancel_on_build_failing: true
plugins:
- docker#v5.12.0:
Expand All @@ -38,7 +43,8 @@ steps:
- label: ":golangci-lint: lint :lint-roller:"
if: build.branch !~ /^renovate\//
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
cancel_on_build_failing: true
timeout_in_minutes: 20
key: "lint"
Expand All @@ -52,7 +58,8 @@ steps:
artifact_paths: ["coverage.out"]
- label: ":golang: go test - {{matrix.version}}"
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
key: "go_test"
cancel_on_build_failing: true
env:
Expand All @@ -77,7 +84,8 @@ steps:
- label: ":auth0: fga model test"
if: build.branch !~ /^renovate\//
agents:
queue: "hosted-small"
queue: $SMALL_RUNNER_QUEUE
size: $RUNNER_SMALL
key: "fga_test"
plugins:
- docker#v5.12.0:
Expand Down Expand Up @@ -131,7 +139,8 @@ steps:
cancel_on_build_failing: true
artifact_paths: "bin/${APP_NAME}"
agents:
queue: "hosted-medium"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
plugins:
- docker#v5.12.0:
image: "ghcr.io/theopenlane/build-image:latest"
Expand All @@ -143,7 +152,8 @@ steps:
- label: ":terminal: build cli"
key: "gobuild-cli"
agents:
queue: "hosted-small"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
cancel_on_build_failing: true
artifact_paths: "bin/openlane-cli"
plugins:
Expand Down Expand Up @@ -191,7 +201,8 @@ steps:
- label: ":docker: docker pr build"
key: "docker-pr-build"
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
cancel_on_build_failing: true
if: build.branch != "main" && build.tag == null
commands: |
Expand Down Expand Up @@ -264,7 +275,8 @@ steps:
- label: ":docker: docker build and publish all in one"
key: "docker-build-aio"
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
if: build.branch == "main"
cancel_on_build_failing: true
commands: |
Expand Down Expand Up @@ -321,7 +333,8 @@ steps:
- label: ":docker: docker build and publish all in one"
key: "docker-build-aio-and-tag"
agents:
queue: "hosted-large"
queue: $LARGE_RUNNER_QUEUE
size: $RUNNER_LARGE
cancel_on_build_failing: true
if: build.tag != null
commands: |
Expand Down
Loading