Skip to content

Commit

Permalink
Prepare to use k8s image registry for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
rikatz committed Jun 27, 2023
1 parent 157ecc2 commit 922e912
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# limitations under the License.

# Image URL to use all building/pushing image targets
IMG ?= ghcr.io/telekom/cluster-api-ipam-provider-in-cluster
IMG ?= gcr.io/k8s-staging-capi-ipam-ic/cluster-api-ipam-provider-in-cluster
TAG ?= $(shell cat TAG)

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26

Expand Down Expand Up @@ -93,12 +95,12 @@ run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

.PHONY: docker-build
docker-build: test licenses-report ## Build docker image with the manager.
docker build -t ${IMG} .
docker-build: licenses-report ## Build docker image with the manager.
docker build -t ${IMG}:$(TAG) .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
docker push ${IMG}
docker push ${IMG}:$(TAG)

##@ Release

Expand Down
1 change: 1 addition & 0 deletions TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0-alpha.2
26 changes: 26 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://cloud.google.com/cloud-build/docs/build-config

timeout: 1800s
options:
substitution_option: ALLOW_LOOSE
steps:
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211118-2f2d816b90'
entrypoint: bash
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- IMG=gcr.io/k8s-staging-capi-ipam-ic/cluster-api-ipam-provider-in-cluster
- REPO_INFO=https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster
- COMMIT_SHA=$_PULL_BASE_SHA
- BUILD_ID=$BUILD_ID
- HOME=/root
- USER=root
args:
- -c
- |
gcloud auth configure-docker \
&& make docker-build \
&& make docker-push
substitutions:
_GIT_TAG: "12345"
_PULL_BASE_REF: "main"
_PULL_BASE_SHA: '12345'

0 comments on commit 922e912

Please sign in to comment.