1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-27 22:14:52 +01:00

Fix Version Output For Automated Container Builds

Prior to this change the output from the command "descheduler version"
when run using the official container images from k8s.gcr.io would
always output an empty string. See below for an example.

```
docker run k8s.gcr.io/descheduler/descheduler:v0.19.0 /bin/descheduler version
Descheduler version {Major: Minor: GitCommit: GitVersion: BuildDate:2020-09-01T16:43:23+0000 GoVersion:go1.15 Compiler:gc Platform:linux/amd64}
```

This change makes it possible to pass the descheduler version
information to the automated container image build process and
also makes it work for local builds too.
This commit is contained in:
Sean Malloy
2020-10-13 00:32:44 -05:00
parent cd3c3bf4da
commit 8795fe6b90
3 changed files with 21 additions and 14 deletions

View File

@@ -15,7 +15,8 @@ FROM golang:1.15.2
WORKDIR /go/src/sigs.k8s.io/descheduler
COPY . .
RUN make
ARG VERSION
RUN VERSION=${VERSION} make
FROM scratch