Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1361 from linki/fix/add-version-to…
Browse files Browse the repository at this point in the history
…-binary

Add version to binary for --version flag
  • Loading branch information
k8s-ci-robot authored Jan 10, 2020
2 parents 4f084af + d0c7063 commit a1ff7d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# builder image
FROM golang:1.13 as builder

ARG VERSION

WORKDIR /sigs.k8s.io/external-dns

COPY . .
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ build.push: build.docker
docker push "$(IMAGE):$(VERSION)"

build.docker:
docker build --rm --tag "$(IMAGE):$(VERSION)" .
docker build --rm --tag "$(IMAGE):$(VERSION)" --build-arg VERSION="$(VERSION)" .

build.mini:
docker build --rm --tag "$(IMAGE):$(VERSION)-mini" -f Dockerfile.mini .
docker build --rm --tag "$(IMAGE):$(VERSION)-mini" --build-arg VERSION="$(VERSION)" -f Dockerfile.mini .

clean:
@rm -rf build
Expand All @@ -72,7 +72,7 @@ clean:
.PHONY: release.staging

release.staging:
IMAGE=$(IMAGE_STAGING) VERSION=$(TAG) $(MAKE) build.docker build.push
IMAGE=$(IMAGE_STAGING) $(MAKE) build.docker build.push

release.prod:
$(MAKE) build.docker build.push
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- TAG=$_GIT_TAG
- VERSION=$_GIT_TAG
- PULL_BASE_REF=$_PULL_BASE_REF
args:
- release.staging
Expand Down

0 comments on commit a1ff7d7

Please sign in to comment.