cirruslabs/cirrus-ci-docs

Support setting instance `type` or machine family for `gce_container`

geekflyer opened this issue · 3 comments

Seems like currently gce_container doesn't really support setting the machine family or instance type.

I tried:

task:
--
36 | name: rust-checks
37 | gce_container:
38 | image_project: cirrus-images
39 | image_family: docker-builder
40 | preemptible: true
41 | use_ssd: true
42 | type: t2d-standard-32
43 | container: rust:1.70

(btw when copying code from the debug information section in the cirrus CI app the code copied gets a bit malformatted as above)

and would have expected a t2d-standard-32 machine but ended up with some 2 core + 4GB ram machine.

Can we add support for setting this for gce_container ? It seems like gce_instance supports predefined machine types via type.

That should also work now.

Just tried this out. Unfortunately doesn't seem to work yet - it's still using some small default machine. Here's the task I tried:



task:
--
36 | name: rust-checks
37 | gce_container:
38 | image_project: cirrus-images
39 | image_family: docker-builder
40 | spot: true
41 | use_ssd: true
42 | type: t2d-standard-16
43 | container: rust:1.70
44 | install_protoc_script:
45 | - apt-get update -y && apt-get install -y protobuf-compiler
46 | prep_script:
47 | - rustup component add rustfmt clippy
48 | generate prisma client_script:
49 | - cargo --config net.git-fetch-with-cli=true prisma generate
50 | fmt_script:
51 | - cargo fmt --all -- --check
52 | check_script:
53 | - cargo check
54 | clippy_script:
55 | - cargo clippy

My bad. It was parser was not updated. Fixed that.