File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ ARCH ?= $(shell go env GOARCH)
2727
2828CONTAINER_RUNTIME ?= docker
2929BUILDER_IMAGE ?=
30- IMG ?= karpenter-clusterapi-controller
30+ REGISTRY ?= gcr.io/k8s-staging-karpenter-cluster-api
31+ TAG ?= latest
32+ IMG ?= $(REGISTRY ) /karpenter-clusterapi-controller:$(TAG )
3133
3234all : help
3335
@@ -52,6 +54,13 @@ karpenter-clusterapi-controller: ## build the main karpenter controller
5254image : # # Build manager container image
5355 $(CONTAINER_RUNTIME ) build --build-arg BUILDER_IMAGE=$(BUILDER_IMAGE ) --build-arg ARCH=$(ARCH ) . -t $(IMG )
5456
57+ .PHONY : image-push
58+ image-push : # # Push the manager container image to the container registry
59+ $(CONTAINER_RUNTIME ) push $(IMG )
60+
61+ .PHONY : release-staging # # Build and push the staging image to the registry.
62+ release-staging : image image-push
63+
5564.PHONY : manifests
5665manifests : # # generate the controller-gen kubernetes manifests
5766 $(CONTROLLER_GEN ) rbac:roleName=manager-role crd paths=" ./..." output:crd:artifacts:config=pkg/apis/crds
Original file line number Diff line number Diff line change 1+ # this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
2+ # or any new substitutions added in the future.
3+ options :
4+ substitution_option : ALLOW_LOOSE
5+ steps :
6+ - name : ' gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:latest'
7+ entrypoint : make
8+ env :
9+ - TAG=$_GIT_TAG
10+ args :
11+ - release-staging
12+ substitutions :
13+ # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
14+ # can be used as a substitution
15+ _GIT_TAG : ' 0.0.0'
16+ # _PULL_BASE_REF will contain the ref that was pushed to to trigger this build -
17+ # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
18+ _PULL_BASE_REF : ' main'
19+ images :
20+ - ' gcr.io/k8s-staging-karpenter-cluster-api/karpenter-clusterapi-controller:$_GIT_TAG'
You can’t perform that action at this time.
0 commit comments