diff --git a/Makefile b/Makefile index e50feb9..347208a 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/TAG b/TAG new file mode 100644 index 0000000..8c65afb --- /dev/null +++ b/TAG @@ -0,0 +1 @@ +v0.1.0-alpha.2 diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000..37c4d0e --- /dev/null +++ b/cloudbuild.yaml @@ -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'