mirror of https://github.com/kedacore/keda.git
pass version string to docker build (#1313)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
This commit is contained in:
parent
58042db5be
commit
50bec808f8
|
@ -1,6 +1,8 @@
|
|||
# Build the manager binary
|
||||
FROM golang:1.15.3 as builder
|
||||
|
||||
ARG BUILD_VERSION
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the Go Modules manifests
|
||||
|
@ -24,7 +26,7 @@ COPY pkg/ pkg/
|
|||
COPY .git/ .git/
|
||||
|
||||
# Build
|
||||
RUN make manager
|
||||
RUN VERSION=${BUILD_VERSION} make manager
|
||||
|
||||
# Use distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Build the manager binary
|
||||
FROM golang:1.15.3 as builder
|
||||
|
||||
ARG BUILD_VERSION
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the Go Modules manifests
|
||||
|
@ -26,7 +28,7 @@ COPY .git/ .git/
|
|||
RUN mkdir -p /apiserver.local.config/certificates && chmod -R 777 /apiserver.local.config
|
||||
|
||||
# Build
|
||||
RUN make adapter
|
||||
RUN VERSION=${BUILD_VERSION} make adapter
|
||||
|
||||
# Use distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
|
|
6
Makefile
6
Makefile
|
@ -130,9 +130,9 @@ undeploy:
|
|||
build: manifests set-version manager adapter
|
||||
|
||||
# Build the docker image
|
||||
docker-build: build
|
||||
docker build . -t ${IMAGE_CONTROLLER}
|
||||
docker build -f Dockerfile.adapter -t ${IMAGE_ADAPTER} .
|
||||
docker-build:
|
||||
docker build . -t ${IMAGE_CONTROLLER} --build-arg BUILD_VERSION=${VERSION}
|
||||
docker build -f Dockerfile.adapter -t ${IMAGE_ADAPTER} . --build-arg BUILD_VERSION=${VERSION}
|
||||
|
||||
# Build KEDA Operator binary
|
||||
.PHONY: manager
|
||||
|
|
Loading…
Reference in New Issue