File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ spec:
197197 value :
198198 - $(params.build-args[*])
199199 - " COMMIT=tasks.clone-repository.results.commit"
200+ - " VERSION=1.7.1"
201+ - " DATE=tasks.clone-repository.results.commit-timestamp"
200202 - name : BUILD_ARGS_FILE
201203 value : $(params.build-args-file)
202204 - name : SOURCE_ARTIFACT
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ RUN npm run build$BUILDSCRIPT
2121
2222FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 as go-builder
2323
24- ARG LDFLAGS
24+ ARG VERSION
25+ ARG DATE
26+
2527WORKDIR /opt/app-root
2628
2729COPY go.mod go.mod
@@ -31,7 +33,7 @@ COPY .mk/ .mk/
3133COPY cmd/ cmd/
3234COPY pkg/ pkg/
3335
34- RUN CGO_ENABLED=0 go build -ldflags "$LDFLAGS " -mod vendor -o plugin-backend cmd/plugin-backend.go
36+ RUN CGO_ENABLED=0 go build -ldflags "-X main.buildVersion=$VERSION -X main.buildDate=$DATE " -mod vendor -o plugin-backend cmd/plugin-backend.go
3537
3638FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
3739
You can’t perform that action at this time.
0 commit comments