diff --git a/Makefile b/Makefile index 6c1fc875c..c688c8c5c 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,8 @@ test: BINARY ?= external-dns SOURCES = $(shell find . -name '*.go') -IMAGE ?= registry.opensource.zalan.do/teapot/$(BINARY) +IMAGE_STAGING = gcr.io/k8s-staging-external-dns/$(BINARY) +IMAGE ?= us.gcr.io/k8s-artifacts-prod/external-dns/$(BINARY) VERSION ?= $(shell git describe --tags --always --dirty) BUILD_FLAGS ?= -v LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s @@ -66,3 +67,12 @@ build.mini: clean: @rm -rf build + + # Builds and push container images to the staging bucket. +.PHONY: release.staging + +release.staging: + IMAGE=$(IMAGE_STAGING) $(MAKE) build.docker build.push + +release.prod: + $(MAKE) build.docker build.push \ No newline at end of file diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 000000000..9b5d134b5 --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,14 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +timeout: 1200s +steps: + - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4" + entrypoint: make + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - TAG=$_GIT_TAG + args: + - release.staging +substitutions: + # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and + # can be used as a substitution + _GIT_TAG: "12345" diff --git a/delivery.yaml b/delivery.yaml deleted file mode 100644 index 6df6938cd..000000000 --- a/delivery.yaml +++ /dev/null @@ -1,23 +0,0 @@ -version: "2017-09-20" -pipeline: -- id: build - overlay: ci/golang - cache: - paths: - - /go/pkg/mod # pkg cache for Go modules - - ~/.cache/go-build # Go build cache - type: script - commands: - - desc: build - cmd: | - make build.docker - - desc: push - cmd: | - if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then - IMAGE=registry-write.opensource.zalan.do/teapot/external-dns - VERSION=$(git describe --tags --always --dirty) - else - IMAGE=registry-write.opensource.zalan.do/teapot/external-dns-test - VERSION=$CDP_BUILD_VERSION - fi - IMAGE=$IMAGE VERSION=$VERSION make build.push