mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
Merge pull request #160 from KohlsTechnology/issue-144
Push Container Images To k8s.gcr.io
This commit is contained in:
16
Makefile
16
Makefile
@@ -15,7 +15,7 @@
|
||||
.PHONY: test
|
||||
|
||||
# VERSION is currently based on the last commit
|
||||
VERSION=`git describe --tags`
|
||||
VERSION?=`git describe --tags`
|
||||
COMMIT=`git rev-parse HEAD`
|
||||
BUILD=`date +%FT%T%z`
|
||||
LDFLAG_LOCATION=github.com/kubernetes-incubator/descheduler/cmd/descheduler/app
|
||||
@@ -25,10 +25,15 @@ LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}
|
||||
GOLANGCI_VERSION := v1.15.0
|
||||
HAS_GOLANGCI := $(shell which golangci-lint)
|
||||
|
||||
# REGISTRY is the container registry to push into.
|
||||
REGISTRY?=staging-k8s.gcr.io
|
||||
|
||||
# IMAGE is the image name of descheduler
|
||||
# Should this be changed?
|
||||
IMAGE:=descheduler:$(VERSION)
|
||||
|
||||
# IMAGE_GCLOUD is the image name of descheduler in the remote registry
|
||||
IMAGE_GCLOUD:=$(REGISTRY)/descheduler:$(VERSION)
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
@@ -40,6 +45,13 @@ dev-image: build
|
||||
image:
|
||||
docker build -t $(IMAGE) .
|
||||
|
||||
push-container-to-gcloud: image
|
||||
gcloud auth configure-docker
|
||||
docker tag $(IMAGE) $(IMAGE_GCLOUD)
|
||||
docker push $(IMAGE_GCLOUD)
|
||||
|
||||
push: push-container-to-gcloud
|
||||
|
||||
clean:
|
||||
rm -rf _output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user