Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .tekton/network-observability-cli-container-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ spec:
value: quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-cli-container:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-args-file
value: Dockerfile-args.downstream
- name: dockerfile
value: Dockerfile.downstream
- name: build-platforms
value: ["linux/x86_64"]
pipelineRef:
name: build-pipeline
4 changes: 4 additions & 0 deletions .tekton/network-observability-cli-container-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ spec:
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-cli-container:{{revision}}
- name: image-expires-after
value: 14d
- name: build-args-file
value: Dockerfile-args.downstream
- name: dockerfile
value: Dockerfile.downstream
pipelineRef:
Expand Down
44 changes: 22 additions & 22 deletions .tekton/pipeline-ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,28 +247,6 @@ spec:
operator: in
values:
- "true"
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:d00d159c370e3c99447516970c316ef57dfd27c29e0ce3cff50727c9c40936d8
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: build-source-image
params:
- name: BINARY_IMAGE
Expand Down Expand Up @@ -319,6 +297,28 @@ spec:
operator: in
values:
- "false"
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:d00d159c370e3c99447516970c316ef57dfd27c29e0ce3cff50727c9c40936d8
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clair-scan
params:
- name: image-digest
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-args.downstream
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BUILDVERSION=1.9.0
25 changes: 9 additions & 16 deletions Dockerfile.downstream
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# We do not use --platform feature to auto fill this ARG because of incompatibility between podman and docker
ARG TARGETARCH
ARG COMMIT
ARG BUILDVERSION

# Make kubectl & oc scripts available for copy
FROM registry.redhat.io/openshift4/ose-cli-rhel9:v4.18.0-202502040032.p0.ga50d4c0.assembly.stream.el9 as ose-cli

# Build the manager binary
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as builder

ARG TARGETARCH=amd64
ARG COMMIT
ARG BUILDVERSION="1.9.0"
ARG IMAGE=registry.redhat.io/network-observability/network-observability-cli-rhel9:1.8
ARG AGENT_IMAGE=registry.redhat.io/network-observability/network-observability-ebpf-agent-rhel9:1.8
ARG BUILDVERSION
ARG IMAGE=registry.redhat.io/network-observability/network-observability-cli-rhel9:${BUILDVERSION}
ARG AGENT_IMAGE=registry.redhat.io/network-observability/network-observability-ebpf-agent-rhel9:${BUILDVERSION}

WORKDIR /opt/app-root

Expand All @@ -24,7 +19,7 @@ COPY vendor/ vendor/

# Build collector
ENV GOEXPERIMENT strictfipsruntime
RUN GOARCH=$TARGETARCH go build -tags strictfipsruntime -ldflags "-X 'main.buildVersion=${BUILDVERSION}' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -a -o build/network-observability-cli
RUN go build -tags strictfipsruntime -ldflags "-X 'main.buildVersion=${BUILDVERSION}' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -a -o build/network-observability-cli

# We still need Makefile & resources for oc-commands; copy them after go build for caching
COPY commands/ commands/
Expand All @@ -40,15 +35,15 @@ RUN USER=netobserv VERSION="$BUILDVERSION" IMAGE="$IMAGE" AGENT_IMAGE="$AGENT_IM
RUN mkdir -p output

# Create final image from ubi + built binary and command
FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi:9.5-1741850090

ARG COMMIT
ARG BUILDVERSION="1.9.0"
FROM registry.access.redhat.com/ubi9/ubi:9.5-1741850090
ARG BUILDVERSION

WORKDIR /

COPY --from=builder /opt/app-root/build .
COPY --from=builder --chown=65532:65532 /opt/app-root/output /output
COPY LICENSE /licenses/
COPY README.downstream ./README

COPY --from=ose-cli /usr/bin/kubectl /usr/bin/kubectl
COPY --from=ose-cli /usr/bin/oc /usr/bin/oc
Expand All @@ -64,7 +59,5 @@ LABEL io.k8s.description="Network Observability CLI"
LABEL summary="Network Observability CLI"
LABEL maintainer="support@redhat.com"
LABEL io.openshift.tags="network-observability-cli"
LABEL upstream-vcs-type="git"
LABEL upstream-vcs-ref=$COMMIT
LABEL description="Network Observability CLI is a lightweight Flow, Packet and Metrics visualization tool for on-demand monitoring."
LABEL version=$BUILDVERSION
4 changes: 4 additions & 0 deletions README.downstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Network Observability CLI

- Online documentation: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/network_observability/network-observability-cli-1
- Source code repository: https://github.com/netobserv/network-observability-cli