diff --git a/cmd/cmrel/cmd/makestage.go b/cmd/cmrel/cmd/makestage.go index 11889bc..51302c4 100644 --- a/cmd/cmrel/cmd/makestage.go +++ b/cmd/cmrel/cmd/makestage.go @@ -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 diff --git a/cmd/cmrel/cmd/publish.go b/cmd/cmrel/cmd/publish.go index 99bccd8..8ee99db 100644 --- a/cmd/cmrel/cmd/publish.go +++ b/cmd/cmrel/cmd/publish.go @@ -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 { diff --git a/cmd/cmrel/cmd/stage.go b/cmd/cmrel/cmd/stage.go index 864e187..08552c8 100644 --- a/cmd/cmrel/cmd/stage.go +++ b/cmd/cmrel/cmd/stage.go @@ -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) diff --git a/gcb/publish/cloudbuild.yaml b/gcb/publish/cloudbuild.yaml index 6c6b66e..ce3bbee 100644 --- a/gcb/publish/cloudbuild.yaml +++ b/gcb/publish/cloudbuild.yaml @@ -69,6 +69,7 @@ tags: - "name-${_TAG_RELEASE_NAME}" options: + machineType: E2_HIGHCPU_32 volumes: - name: go-modules path: /go diff --git a/gcb/stage/cloudbuild.yaml b/gcb/stage/cloudbuild.yaml index c1d3fe8..89d712a 100644 --- a/gcb/stage/cloudbuild.yaml +++ b/gcb/stage/cloudbuild.yaml @@ -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: @@ -42,6 +41,7 @@ tags: - "branch-${_TAG_RELEASE_BRANCH}" options: + machineType: N1_HIGHCPU_32 volumes: - name: go-modules path: /go @@ -70,5 +70,3 @@ substitutions: ## Used as a tag to identify the build more easily later _TAG_RELEASE_BRANCH: "" -options: - machineType: n1-highcpu-32