File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Build the manager binary
2
2
FROM golang:1.15.3 as builder
3
3
4
+ ARG BUILD_VERSION
5
+
4
6
WORKDIR /workspace
5
7
6
8
# Copy the Go Modules manifests
@@ -24,7 +26,7 @@ COPY pkg/ pkg/
24
26
COPY .git/ .git/
25
27
26
28
# Build
27
- RUN make manager
29
+ RUN VERSION=${BUILD_VERSION} make manager
28
30
29
31
# Use distroless as minimal base image to package the manager binary
30
32
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Original file line number Diff line number Diff line change 1
1
# Build the manager binary
2
2
FROM golang:1.15.3 as builder
3
3
4
+ ARG BUILD_VERSION
5
+
4
6
WORKDIR /workspace
5
7
6
8
# Copy the Go Modules manifests
@@ -26,7 +28,7 @@ COPY .git/ .git/
26
28
RUN mkdir -p /apiserver.local.config/certificates && chmod -R 777 /apiserver.local.config
27
29
28
30
# Build
29
- RUN make adapter
31
+ RUN VERSION=${BUILD_VERSION} make adapter
30
32
31
33
# Use distroless as minimal base image to package the manager binary
32
34
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Original file line number Diff line number Diff line change @@ -130,9 +130,9 @@ undeploy:
130
130
build : manifests set-version manager adapter
131
131
132
132
# Build the docker image
133
- docker-build : build
134
- docker build . -t ${IMAGE_CONTROLLER}
135
- docker build -f Dockerfile.adapter -t ${IMAGE_ADAPTER} .
133
+ docker-build :
134
+ docker build . -t ${IMAGE_CONTROLLER} --build-arg BUILD_VERSION= ${VERSION}
135
+ docker build -f Dockerfile.adapter -t ${IMAGE_ADAPTER} . --build-arg BUILD_VERSION= ${VERSION}
136
136
137
137
# Build KEDA Operator binary
138
138
.PHONY : manager
You can’t perform that action at this time.
0 commit comments