Skip to content

Commit bd36ff9

Browse files
committed
Fix license and other issues in dockerfile
1 parent 28408c3 commit bd36ff9

File tree

5 files changed

+22
-59
lines changed

5 files changed

+22
-59
lines changed

.tekton/network-observability-console-plugin-pull-request.yaml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,11 @@ spec:
2626
value: quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-console-plugin:on-pr-{{revision}}
2727
- name: image-expires-after
2828
value: 5d
29+
- name: build-args-file
30+
value: Dockerfile-args.downstream
2931
- name: dockerfile
3032
value: Dockerfile.downstream
3133
- name: build-platforms
3234
value: ["linux/x86_64"]
3335
pipelineRef:
3436
name: build-pipeline
35-
taskRunTemplate: {}
36-
workspaces:
37-
- name: workspace
38-
volumeClaimTemplate:
39-
metadata:
40-
creationTimestamp: null
41-
spec:
42-
accessModes:
43-
- ReadWriteOnce
44-
resources:
45-
requests:
46-
storage: 1Gi
47-
status: {}
48-
- name: git-auth
49-
secret:
50-
secretName: '{{ git_auth_secret }}'
51-
status: {}

.tekton/network-observability-console-plugin-push.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,11 @@ spec:
2424
value: '{{revision}}'
2525
- name: output-image
2626
value: quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-console-plugin:{{revision}}
27+
- name: image-expires-after
28+
value: 14d
29+
- name: build-args-file
30+
value: Dockerfile-args.downstream
2731
- name: dockerfile
2832
value: Dockerfile.downstream
2933
pipelineRef:
3034
name: build-pipeline
31-
taskRunTemplate: {}
32-
workspaces:
33-
- name: workspace
34-
volumeClaimTemplate:
35-
metadata:
36-
creationTimestamp: null
37-
spec:
38-
accessModes:
39-
- ReadWriteOnce
40-
resources:
41-
requests:
42-
storage: 1Gi
43-
status: {}
44-
- name: git-auth
45-
secret:
46-
secretName: '{{ git_auth_secret }}'
47-
status: {}

.tekton/pipeline-ref.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ spec:
2121
- description: Source Repository URL
2222
name: git-url
2323
type: string
24-
- description: Version to build
25-
name: build-version
26-
type: string
27-
default: "main"
2824
- default: ""
2925
description: Revision of the Source Repository
3026
name: revision
@@ -248,9 +244,6 @@ spec:
248244
- name: BUILD_ARGS
249245
value:
250246
- $(params.build-args[*])
251-
- "COMMIT=$(tasks.clone-repository.results.commit)"
252-
- "BUILDVERSION=$(params.build-version)"
253-
- "DATE=$(tasks.clone-repository.results.commit-timestamp)"
254247
- "FRONTBUILD=$(params.output-image)-front"
255248
- name: BUILD_ARGS_FILE
256249
value: $(params.build-args-file)
@@ -332,20 +325,20 @@ spec:
332325
operator: in
333326
values:
334327
- "true"
335-
- name: rpms-signature-scan
328+
- name: deprecated-base-image-check
336329
params:
337-
- name: image-url
330+
- name: IMAGE_URL
338331
value: $(tasks.build-image-index.results.IMAGE_URL)
339-
- name: image-digest
332+
- name: IMAGE_DIGEST
340333
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
341334
runAfter:
342335
- build-image-index
343336
taskRef:
344337
params:
345338
- name: name
346-
value: rpms-signature-scan
339+
value: deprecated-image-check
347340
- name: bundle
348-
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:e603b3df510aeefeaa12e8778c4642b21743cb0ae68704359dc7ffd2814249d2
341+
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:ced089bd8d86f95ee70f6ee1a6941d677f1c66c3b8f02fa60f9309c6c32e1929
349342
- name: kind
350343
value: task
351344
resolver: bundles
@@ -354,20 +347,20 @@ spec:
354347
operator: in
355348
values:
356349
- "false"
357-
- name: deprecated-base-image-check
350+
- name: rpms-signature-scan
358351
params:
359-
- name: IMAGE_URL
352+
- name: image-url
360353
value: $(tasks.build-image-index.results.IMAGE_URL)
361-
- name: IMAGE_DIGEST
354+
- name: image-digest
362355
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
363356
runAfter:
364357
- build-image-index
365358
taskRef:
366359
params:
367360
- name: name
368-
value: deprecated-image-check
361+
value: rpms-signature-scan
369362
- name: bundle
370-
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:ced089bd8d86f95ee70f6ee1a6941d677f1c66c3b8f02fa60f9309c6c32e1929
363+
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:e603b3df510aeefeaa12e8778c4642b21743cb0ae68704359dc7ffd2814249d2
371364
- name: kind
372365
value: task
373366
resolver: bundles

Dockerfile-args.downstream

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BUILDVERSION=1.9.0

Dockerfile.downstream

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
ARG COMMIT
1+
ARG BUILDVERSION
22
ARG FRONTBUILD
33

44
FROM $FRONTBUILD as web-builder
55

66
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as go-builder
77

88
ARG BUILDVERSION
9-
ARG DATE
109

1110
WORKDIR /opt/app-root
1211

1312
COPY go.mod go.mod
1413
COPY go.sum go.sum
1514
COPY vendor/ vendor/
16-
COPY .mk/ .mk/
1715
COPY cmd/ cmd/
1816
COPY pkg/ pkg/
1917

2018
ENV GOEXPERIMENT strictfipsruntime
21-
RUN go build -tags strictfipsruntime -ldflags "-X main.buildVersion=$BUILDVERSION -X main.buildDate=$DATE" -mod vendor -o plugin-backend cmd/plugin-backend.go
19+
RUN go build -tags strictfipsruntime -ldflags "-X main.buildVersion=$BUILDVERSION -X main.buildDate=`date +%Y-%m-%d\ %H:%M`" -mod vendor -o plugin-backend cmd/plugin-backend.go
2220

2321
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5-1739420147
22+
ARG BUILDVERSION
2423

2524
COPY --from=web-builder /opt/app-root/web/dist ./web/dist
2625
COPY --from=go-builder /opt/app-root/plugin-backend ./
27-
COPY LICENSE ./
26+
COPY LICENSE /licenses/
2827

2928
ENTRYPOINT ["./plugin-backend"]
3029

@@ -35,7 +34,5 @@ LABEL io.k8s.description="Network Observability Console Plugin"
3534
LABEL summary="Network Observability Console Plugin"
3635
LABEL maintainer="[email protected]"
3736
LABEL io.openshift.tags="network-observability-console-plugin"
38-
LABEL upstream-vcs-ref="$COMMIT"
39-
LABEL upstream-vcs-type="git"
4037
LABEL description="Network Observability visualization tool for the OpenShift Console."
41-
LABEL version="1.9.0"
38+
LABEL version=$BUILDVERSION

0 commit comments

Comments
 (0)