mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 01:56:57 +02:00
Merge pull request #1326 from njuettner/image-publishing
Enable image publishing
This commit is contained in:
commit
4c6b7c328d
12
Makefile
12
Makefile
@ -45,7 +45,8 @@ test:
|
|||||||
|
|
||||||
BINARY ?= external-dns
|
BINARY ?= external-dns
|
||||||
SOURCES = $(shell find . -name '*.go')
|
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)
|
VERSION ?= $(shell git describe --tags --always --dirty)
|
||||||
BUILD_FLAGS ?= -v
|
BUILD_FLAGS ?= -v
|
||||||
LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s
|
LDFLAGS ?= -X sigs.k8s.io/external-dns/pkg/apis/externaldns.Version=$(VERSION) -w -s
|
||||||
@ -66,3 +67,12 @@ build.mini:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf build
|
@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
|
14
cloudbuild.yaml
Normal file
14
cloudbuild.yaml
Normal file
@ -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"
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user