Skip to content

Commit 3e7b0db

Browse files
committed
Fix version in konflux build
1 parent 751e427 commit 3e7b0db

File tree

2 files changed

+58
-21
lines changed

2 files changed

+58
-21
lines changed

.tekton/pipeline-ref.yaml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
- name: name
1414
value: show-sbom
1515
- name: bundle
16-
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:945a7c9066d3e0a95d3fddb7e8a6992e4d632a2a75d8f3a9bd2ff2fef0ec9aa0
16+
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:52f8b96b96ce4203d4b74d850a85f963125bf8eef0683ea5acdd80818d335a28
1717
- name: kind
1818
value: task
1919
resolver: bundles
@@ -25,6 +25,10 @@ spec:
2525
description: Revision of the Source Repository
2626
name: revision
2727
type: string
28+
- default: "main"
29+
description: Version to build
30+
name: build-version
31+
type: string
2832
- description: Fully Qualified Output Image
2933
name: output-image
3034
type: string
@@ -81,10 +85,10 @@ spec:
8185
results:
8286
- description: ""
8387
name: IMAGE_URL
84-
value: $(tasks.build-container.results.IMAGE_URL)
88+
value: $(tasks.build-image-index.results.IMAGE_URL)
8589
- description: ""
8690
name: IMAGE_DIGEST
87-
value: $(tasks.build-container.results.IMAGE_DIGEST)
91+
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
8892
- description: ""
8993
name: CHAINS-GIT_URL
9094
value: $(tasks.clone-repository.results.url)
@@ -108,7 +112,7 @@ spec:
108112
- name: name
109113
value: init
110114
- name: bundle
111-
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:0523b51c28375a3f222da91690e22eff11888ebc98a0c73c468af44762265c69
115+
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:f239f38bba3a8351c8cb0980fde8e2ee477ded7200178b0f45175e4006ff1dca
112116
- name: kind
113117
value: task
114118
resolver: bundles
@@ -129,7 +133,7 @@ spec:
129133
- name: name
130134
value: git-clone-oci-ta
131135
- name: bundle
132-
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:4bf48d038ff12d25bdeb5ab3e98dc2271818056f454c83d7393ebbd413028147
136+
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:d1e63ec00bed1c9f0f571fa76b4da570be49a7c255c610544a461495230ba1b1
133137
- name: kind
134138
value: task
135139
resolver: bundles
@@ -158,7 +162,7 @@ spec:
158162
- name: name
159163
value: prefetch-dependencies-oci-ta
160164
- name: bundle
161-
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.1@sha256:b1ac9124ad909a8d7dbac01b1a02ef9a973d448d4c94efcf3d1b29e2a5c9e76f
165+
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.1@sha256:3c11f5de6a0281bf93857f0c85bbbdfeda4cc118337da273fef0c138bda5eebb
162166
- name: kind
163167
value: task
164168
resolver: bundles
@@ -196,7 +200,9 @@ spec:
196200
- name: BUILD_ARGS
197201
value:
198202
- $(params.build-args[*])
199-
- "COMMIT=tasks.clone-repository.results.commit"
203+
- "COMMIT=$(tasks.clone-repository.results.commit)"
204+
- "BUILDVERSION=$(params.build-version)"
205+
- "DATE=$(tasks.clone-repository.results.commit-timestamp)"
200206
- name: BUILD_ARGS_FILE
201207
value: $(params.build-args-file)
202208
- name: SOURCE_ARTIFACT
@@ -212,7 +218,7 @@ spec:
212218
- name: name
213219
value: buildah-remote-oci-ta
214220
- name: bundle
215-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.2@sha256:52a1a93cf99ab1f1092e983ac41b3684b7af004772d325e89b42e82e046bc7d1
221+
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.2@sha256:cfc8f89bc984ae8309df82ac15cc6e302832f48f51cc0bde56edb4f43e57ffcf
216222
- name: kind
217223
value: task
218224
resolver: bundles
@@ -241,7 +247,7 @@ spec:
241247
- name: name
242248
value: build-image-index
243249
- name: bundle
244-
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:ebc17bb22481160eec6eb7277df1e48b90f599bebe563cd4f046807f4e32ced3
250+
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:5da8c2f09990b801f1fd02a0ab3c4136845661e53c98e8a7ebf720774e064fac
245251
- name: kind
246252
value: task
247253
resolver: bundles
@@ -266,7 +272,7 @@ spec:
266272
- name: name
267273
value: source-build-oci-ta
268274
- name: bundle
269-
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.1@sha256:bd786bc1d33391bb169f98a1070d1a39e410b835f05fd0db0263754c65bd9bea
275+
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.1@sha256:178298b5c8bbc2f8fa91ef94aca57a5a2dcb3834c71c8835bae51a20fe30e4e7
270276
- name: kind
271277
value: task
272278
resolver: bundles
@@ -292,7 +298,29 @@ spec:
292298
- name: name
293299
value: deprecated-image-check
294300
- name: bundle
295-
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:5a1a165fa02270f0a947d8a2131ee9d8be0b8e9d34123828c2bef589e504ee84
301+
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:443ffa897ee35e416a0bfd39721c68cbf88cfa5c74c843c5183218d0cd586e82
302+
- name: kind
303+
value: task
304+
resolver: bundles
305+
when:
306+
- input: $(params.skip-checks)
307+
operator: in
308+
values:
309+
- "false"
310+
- name: rpms-signature-scan
311+
params:
312+
- name: image-url
313+
value: $(tasks.build-image-index.results.IMAGE_URL)
314+
- name: image-digest
315+
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
316+
runAfter:
317+
- build-image-index
318+
taskRef:
319+
params:
320+
- name: name
321+
value: rpms-signature-scan
322+
- name: bundle
323+
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:7aa4d3c95e2b963e82fdda392f7cb3d61e3dab035416cf4a3a34e43cf3c9c9b8
296324
- name: kind
297325
value: task
298326
resolver: bundles
@@ -314,7 +342,7 @@ spec:
314342
- name: name
315343
value: clair-scan
316344
- name: bundle
317-
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:0a5421111e7092740398691d5bd7c125cc0896f29531d19414bb5724ae41692a
345+
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:90e371fe7ec2288259a906bc1fd49c53b8b97a0b0b02da0893fb65e3be2a5801
318346
- name: kind
319347
value: task
320348
resolver: bundles
@@ -334,7 +362,7 @@ spec:
334362
- name: name
335363
value: ecosystem-cert-preflight-checks
336364
- name: bundle
337-
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:df8a25a3431a70544172ed4844f9d0c6229d39130633960729f825a031a7dea9
365+
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:5131cce0f93d0b728c7bcc0d6cee4c61d4c9f67c6d619c627e41e3c9775b497d
338366
- name: kind
339367
value: task
340368
resolver: bundles
@@ -360,7 +388,7 @@ spec:
360388
- name: name
361389
value: sast-snyk-check-oci-ta
362390
- name: bundle
363-
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:65a213322ea7c64159e37071d369d74b6378b23403150e29537865cada90f022
391+
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:699cfad1caaa4060f0a6de5d5fb376bf2eb90967d89ec4ffef328fd358ac966d
364392
- name: kind
365393
value: task
366394
resolver: bundles
@@ -382,7 +410,7 @@ spec:
382410
- name: name
383411
value: clamav-scan
384412
- name: bundle
385-
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.1@sha256:b4f450f1447b166da671f1d5819ab5a1485083e5c27ab91f7d8b7a2ff994c8c2
413+
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.1@sha256:1981b5aa330a4d59f59d760e54a36ebd596948abf6a36e45e103d4fd82ecbcf3
386414
- name: kind
387415
value: task
388416
resolver: bundles
@@ -425,7 +453,7 @@ spec:
425453
- name: name
426454
value: push-dockerfile-oci-ta
427455
- name: bundle
428-
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:80d48a1b9d2707490309941ec9f79338533938f959ca9a207b481b0e8a5e7a93
456+
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:eee2eb7b5ce2e55dde37114fefe842080c8a8e443dcc2ccf324cfb22b0453db4
429457
- name: kind
430458
value: task
431459
resolver: bundles

contrib/docker/Dockerfile.downstream

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,32 @@ ARG COMMIT
33
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 as builder
44

55
ARG TARGETARCH=amd64
6-
ARG LDFLAGS
6+
ARG BUILDVERSION
7+
ARG DATE
8+
79
WORKDIR /app
810

911
# Copy source code
1012
COPY go.mod .
1113
COPY go.sum .
14+
COPY Makefile .
15+
COPY .mk/ .mk/
1216
COPY vendor/ vendor/
17+
COPY .git/ .git/
1318
COPY cmd/ cmd/
1419
COPY pkg/ pkg/
1520

16-
RUN GOARCH=$TARGETARCH go build -ldflags "$LDFLAGS" -mod vendor -o flowlogs-pipeline cmd/flowlogs-pipeline/main.go
21+
RUN git status --porcelain
22+
RUN GOARCH=$TARGETARCH go build -ldflags "-X main.BuildVersion=$BUILDVERSION -X main.BuildDate=$DATE" "./cmd/flowlogs-pipeline"
1723

1824
# final stage
19-
FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi-minimal:9.4
25+
FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi-minimal:9.5
26+
27+
ARG COMMIT
2028

2129
COPY --from=builder /app/flowlogs-pipeline /app/
2230

31+
# expose ports
2332
ENTRYPOINT ["/app/flowlogs-pipeline"]
2433

2534
LABEL com.redhat.component="network-observability-flowlogs-pipeline-container"
@@ -30,5 +39,5 @@ LABEL summary="Network Observability Flow-Logs Pipeline"
3039
LABEL maintainer="[email protected]"
3140
LABEL io.openshift.tags="network-observability-flowlogs-pipeline"
3241
LABEL upstream-vcs-type="git"
33-
LABEL upstream-vcs-type="$COMMIT"
34-
LABEL description="Flow-Logs Pipeline is an observability tool that consumes logs from various inputs, transform them and export logs to Loki and / or metrics to Prometheus."
42+
LABEL upstream-vcs-ref="$COMMIT"
43+
LABEL 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."

0 commit comments

Comments
 (0)