Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Switch to public Docker image registry
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranzke committed Feb 2, 2018
1 parent e7f9fa0 commit a1d6864
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM alpine:3.7

RUN apk add --update bash curl

ADD ./rel/bin/aws-lb-readvertiser /aws-lb-readvertiser
ADD ./bin/rel/aws-lb-readvertiser /aws-lb-readvertiser

WORKDIR /

Expand Down
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ REPOSITORY := $(VCS)/$(ORGANIZATION)/$(PROJECT)
VERSION := $(shell cat VERSION)
LD_FLAGS := "-w -X $(REPOSITORY)/pkg/version.Version=$(VERSION)"
PACKAGES := $(shell go list ./... | grep -v '/vendor/')
REGISTRY := eu.gcr.io/sap-cloud-platform-dev1
IMAGE_REPOSITORY := $(REGISTRY)/garden/$(PROJECT)
REGISTRY := eu.gcr.io/gardener-project/gardener
IMAGE_REPOSITORY := $(REGISTRY)/$(PROJECT)
IMAGE_TAG := $(VERSION)

BIN_DIR := bin
Expand All @@ -45,20 +45,15 @@ build:
@go build -o $(BIN_DIR)/aws-lb-readvertiser $(GO_EXTRA_FLAGS) -ldflags $(LD_FLAGS) main.go

.PHONY: release
release: build docker-build docker-image docker-login docker-push rename-binaries
release: build build-release docker-image docker-login docker-push rename-binaries

.PHONY: build-release
build-release:
@go build -o /go/bin/aws-lb-readvertiser $(GO_EXTRA_FLAGS) -ldflags $(LD_FLAGS) main.go

.PHONY: docker-build
docker-build:
@./hack/build-release
@sudo chown $(user):$(group) $(BIN_DIR)/rel/aws-lb-readvertiser
@env GOOS=linux GOARCH=amd64 go build -o $(BIN_DIR)/rel/aws-lb-readvertiser $(GO_EXTRA_FLAGS) -ldflags $(LD_FLAGS) main.go

.PHONY: docker-image
docker-image:
@if [[ ! -f rel/bin/aws-lb-readvertiser ]]; then echo "No binary found. Please run 'make docker-build'"; false; fi
@if [[ ! -f $(BIN_DIR)/rel/aws-lb-readvertiser ]]; then echo "No binary found. Please run 'make build-release'"; false; fi
@docker build -t $(IMAGE_REPOSITORY):$(IMAGE_TAG) --rm .

.PHONY: docker-login
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.1.0-dev
2 changes: 1 addition & 1 deletion example/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
operator: Exists
containers:
- name: readvertiser
image: eu.gcr.io/sap-cloud-platform-dev1/garden/aws-lb-readvertiser:v0.0.2
image: eu.gcr.io/gardener-project/gardener/aws-lb-readvertiser:v0.0.2
imagePullPolicy: IfNotPresent
args:
- "--name=kube-apiserver"
Expand Down
33 changes: 0 additions & 33 deletions hack/build-release

This file was deleted.

0 comments on commit a1d6864

Please sign in to comment.