Skip to content
Open
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
6 changes: 5 additions & 1 deletion cmd/cmrel/cmd/makestage.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ func runMakeStage(rootOpts *rootOptions, o *makeStageOptions) error {
}

if build.Options == nil {
build.Options = &cloudbuild.BuildOptions{MachineType: "n1-highcpu-32"}
build.Options = &cloudbuild.BuildOptions{}
}

if build.Options.MachineType == "" {
build.Options.MachineType = "N1_HIGHCPU_32"
}

build.Substitutions["_CM_REF"] = o.Ref
Expand Down
8 changes: 8 additions & 0 deletions cmd/cmrel/cmd/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ func runPublish(rootOpts *rootOptions, o *publishOptions) error {
return fmt.Errorf("error loading cloudbuild.yaml file: %w", err)
}

if build.Options == nil {
build.Options = &cloudbuild.BuildOptions{}
}

if build.Options.MachineType == "" {
build.Options.MachineType = "E2_HIGHCPU_32"
}

// make sure that publish-actions is valid
_, err = canonicalizeAndVerifyPublishActions(o.PublishActions)
if err != nil {
Expand Down
6 changes: 5 additions & 1 deletion cmd/cmrel/cmd/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ func runStage(rootOpts *rootOptions, o *stageOptions) error {
}

if build.Options == nil {
build.Options = &cloudbuild.BuildOptions{MachineType: "n1-highcpu-32"}
build.Options = &cloudbuild.BuildOptions{}
}

if build.Options.MachineType == "" {
build.Options.MachineType = "N1_HIGHCPU_32"
}

targetOSes, err := release.OSListFromString(o.TargetOSes)
Expand Down
1 change: 1 addition & 0 deletions gcb/publish/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tags:
- "name-${_TAG_RELEASE_NAME}"

options:
machineType: E2_HIGHCPU_32
volumes:
- name: go-modules
path: /go
Expand Down
4 changes: 1 addition & 3 deletions gcb/stage/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ steps:
set -e
git clone "${_CM_REPO}" . && git checkout "${_CM_REF}"

steps:
- name: docker.io/library/golang:1.23-alpine
entrypoint: go
args:
Expand Down Expand Up @@ -42,6 +41,7 @@ tags:
- "branch-${_TAG_RELEASE_BRANCH}"

options:
machineType: N1_HIGHCPU_32
volumes:
- name: go-modules
path: /go
Expand Down Expand Up @@ -70,5 +70,3 @@ substitutions:
## Used as a tag to identify the build more easily later
_TAG_RELEASE_BRANCH: ""

options:
machineType: n1-highcpu-32
Loading