File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ spec:
197197 value :
198198 - $(params.build-args[*])
199199 - " COMMIT=tasks.clone-repository.results.commit"
200+ - " LDFLAGS=-X main.BuildVersion=1.7.1-$(tasks.clone-repository.results.commit) -X main.BuildDate=$(tasks.clone-repository.results.commit-timestamp)"
200201 - name : BUILD_ARGS_FILE
201202 value : $(params.build-args-file)
202203 - name : SOURCE_ARTIFACT
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ ARG COMMIT
33FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 as builder
44
55ARG TARGETARCH=amd64
6+ ARG VERSION
7+ ARG DATE
8+
69WORKDIR /app
710
811# Copy source code
@@ -17,11 +20,13 @@ COPY cmd/ cmd/
1720COPY pkg/ pkg/
1821
1922RUN git status --porcelain
20- RUN GOARCH=$TARGETARCH make build_code
23+ RUN GOARCH=$TARGETARCH go build -ldflags "-X main.BuildVersion=$VERSION -X main.BuildDate=$DATE" "./cmd/flowlogs-pipeline"
2124
2225# final stage
2326FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi-minimal:9.5
2427
28+ ARG COMMIT
29+
2530COPY --from=builder /app/flowlogs-pipeline /app/
2631
2732# expose ports
@@ -35,5 +40,5 @@ LABEL summary="Network Observability Flow-Logs Pipeline"
3540LABEL maintainer="support@redhat.com"
3641LABEL io.openshift.tags="network-observability-flowlogs-pipeline"
3742LABEL upstream-vcs-type="git"
38- LABEL upstream-vcs-type ="$COMMIT"
43+ LABEL upstream-vcs-ref ="$COMMIT"
3944LABEL description="Flow-Logs Pipeline (a.k.a. FLP) is an observability tool that consumes logs from various inputs, transform them and export logs to loki and / or time series metrics to prometheus."
You can’t perform that action at this time.
0 commit comments