@@ -143,6 +143,12 @@ LDFLAGS := $(shell source ./hack/version.sh; version::ldflags)
143143# Set USE_EXISTING_CLUSTER to use an existing kubernetes context
144144USE_EXISTING_CLUSTER ?= "false"
145145
146+ # GORELEASER_PARALLELISM restricts the number of tasks goreleaser will run
147+ # concurrently. The primary reason to do this is to ensure its memory usage
148+ # remains within the resource limits of the
149+ # cluster-api-provider-aws-build-docker job
150+ GORELEASER_PARALLELISM ?= 2
151+
146152# Set E2E_SKIP_EKS_UPGRADE to false to test EKS upgrades.
147153# Warning, this takes a long time
148154E2E_SKIP_EKS_UPGRADE ?= "false"
@@ -571,7 +577,7 @@ release: clean-release check-release-tag check-release-branch $(RELEASE_DIR) $(G
571577 $(MAKE ) release-changelog
572578 CORE_CONTROLLER_IMG=$(PROD_REGISTRY ) /$(CORE_IMAGE_NAME ) $(MAKE ) release-manifests
573579 $(MAKE ) release-policies
574- $(GORELEASER ) release --config $(GORELEASER_CONFIG ) --release-notes $(RELEASE_DIR ) /CHANGELOG.md --clean
580+ $(GORELEASER ) release --config $(GORELEASER_CONFIG ) --release-notes $(RELEASE_DIR ) /CHANGELOG.md --clean --parallelism $( GORELEASER_PARALLELISM )
575581
576582release-policies : $(RELEASE_POLICIES ) # # Release policies
577583
@@ -606,7 +612,7 @@ promote-images: $(KPROMO) $(YQ)
606612
607613.PHONY : release-binaries
608614release-binaries : $(GORELEASER ) # # Builds only the binaries, not a release.
609- GOMAXPROCS=2 $(GORELEASER ) build --config $(GORELEASER_CONFIG ) --snapshot --clean
615+ $(GORELEASER ) build --config $(GORELEASER_CONFIG ) --snapshot --clean --parallelism $( GORELEASER_PARALLELISM )
610616
611617.PHONY : release-staging
612618release-staging : # # Builds and push container images and manifests to the staging bucket.
0 commit comments