mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
Push Container Images To k8s.gcr.io
Run below commands to build and push a staging image to staging-k8s.gcr.io. ``` $ make push ``` Run below commands to build and push a release image to k8s.gcr.io. ``` $ git checkout v0.9.0 $ VERSION=v0.9.0 REGISTRY=k8s.gcr.io make push ```
This commit is contained in:
14
Makefile
14
Makefile
@@ -15,7 +15,7 @@
|
|||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
# VERSION is currently based on the last commit
|
# VERSION is currently based on the last commit
|
||||||
VERSION=`git describe --tags`
|
VERSION?=`git describe --tags`
|
||||||
COMMIT=`git rev-parse HEAD`
|
COMMIT=`git rev-parse HEAD`
|
||||||
BUILD=`date +%FT%T%z`
|
BUILD=`date +%FT%T%z`
|
||||||
LDFLAG_LOCATION=github.com/kubernetes-incubator/descheduler/cmd/descheduler/app
|
LDFLAG_LOCATION=github.com/kubernetes-incubator/descheduler/cmd/descheduler/app
|
||||||
@@ -25,9 +25,11 @@ LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}
|
|||||||
GOLANGCI_VERSION := v1.15.0
|
GOLANGCI_VERSION := v1.15.0
|
||||||
HAS_GOLANGCI := $(shell which golangci-lint)
|
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
|
# IMAGE is the image name of descheduler
|
||||||
# Should this be changed?
|
IMAGE:=$(REGISTRY)/descheduler:$(VERSION)
|
||||||
IMAGE:=descheduler:$(VERSION)
|
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@@ -40,6 +42,12 @@ dev-image: build
|
|||||||
image:
|
image:
|
||||||
docker build -t $(IMAGE) .
|
docker build -t $(IMAGE) .
|
||||||
|
|
||||||
|
push-container: image
|
||||||
|
gcloud auth configure-docker
|
||||||
|
docker push $(IMAGE)
|
||||||
|
|
||||||
|
push: push-container
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf _output
|
rm -rf _output
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user