Skip to content

Commit

Permalink
chore: run Aspect Workflows setup step on small instances
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Dec 13, 2023
1 parent 13aefd6 commit 820f5c5
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 34 deletions.
61 changes: 34 additions & 27 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,51 @@
---
queue: bazel-lib
queue: bazel-lib-small
env:
CC: /bin/false
workspaces:
- .
- e2e/smoke:
tasks:
format:
.:
tasks:
- test:
queue: bazel-lib
e2e/smoke:
icon: bazel
tasks:
- format:
without: true
gazelle:
- gazelle:
without: true
buildifier:
- buildifier:
without: true
- e2e/coreutils:
tasks:
format:
e2e/coreutils:
icon: bazel
tasks:
- format:
without: true
gazelle:
- gazelle:
without: true
buildifier:
- buildifier:
without: true
- e2e/copy_to_directory:
tasks:
format:
e2e/copy_to_directory:
icon: bazel
tasks:
- format:
without: true
gazelle:
- gazelle:
without: true
buildifier:
- buildifier:
without: true
- e2e/external_copy_to_directory:
tasks:
format:
e2e/external_copy_to_directory:
icon: bazel
tasks:
- format:
without: true
gazelle:
- gazelle:
without: true
buildifier:
- buildifier:
without: true
tasks:
format:
soft_fail: false
gazelle:
buildifier:
test:
- test:
- format:
soft_fail: false
- gazelle:
- buildifier:
26 changes: 21 additions & 5 deletions .aspect/workflows/terraform/workflows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "aspect_workflows" {
region = local.region

# Aspect Workflows terraform module
source = "https://s3.us-east-2.amazonaws.com/static.aspect.build/aspect/5.9.0-beta.2/workflows-gcp/terraform-gcp-aspect-workflows.zip"
source = "https://s3.us-east-2.amazonaws.com/static.aspect.build/aspect/5.9.0-beta.10/workflows-gcp/terraform-gcp-aspect-workflows.zip"

# Network properties
network = google_compute_network.workflows_network.id
Expand All @@ -29,7 +29,10 @@ module "aspect_workflows" {
machine_type = "e2-standard-2"
}

# Remote cache configuration
# Delivery properties
delivery_enabled = true

# Remote cache properties
remote = {
cache_shards = 3
cache_size_gb = 384
Expand All @@ -55,26 +58,39 @@ module "aspect_workflows" {
image_id = data.google_compute_image.runner_image.id
use_preemptible = true
}
small = {
# Aspect Workflows requires machine types that have local SSD drives. See
# https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for full list
# of machine types availble on GCP.
machine_type = "n1-standard-1"
image_id = data.google_compute_image.runner_image.id
use_preemptible = true
}
}

# CircleCI runner group definitions
cci_runner_groups = {
# The default runner group is use for the main build & test workflows.
default = {
agent_idle_timeout_min = 1
job_max_run_time_min = 5 * 60
max_runners = 10
min_runners = 0
resource_type = "default"
scale_out_factor = 7
scaling_polling_frequency = 3 # check for queued jobs every 20s
warming = true
}
small = {
agent_idle_timeout_min = 1
max_runners = 10
min_runners = 0
resource_type = "small"
scaling_polling_frequency = 3 # check for queued jobs every 20s
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
}
# The warming runner group is used for the periodic warming job that creates
# warming archives for use by other runner groups.
warming = {
agent_idle_timeout_min = 1
job_max_run_time_min = 5 * 60
max_runners = 1
min_runners = 0
resource_type = "default"
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setup: true

orbs:
slack: circleci/[email protected]
aspect-workflows: aspect-build/workflows@dev:5.9.0-beta.2
aspect-workflows: aspect-build/workflows@dev:5.9.0-beta.10

jobs:
legacy:
Expand All @@ -41,6 +41,6 @@ workflows:
jobs:
- legacy
- aspect-workflows/setup:
resource_class: aspect-build/bazel-lib
resource_class: aspect-build/bazel-lib-small
context:
- slack

0 comments on commit 820f5c5

Please sign in to comment.