Skip to content

Commit

Permalink
ci(konflux): configurable labels for downstream
Browse files Browse the repository at this point in the history
With default values pointing for upstream values.
  • Loading branch information
bruno-fs committed Jan 14, 2025
1 parent 91a9973 commit c1b3591
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .tekton/discovery-ui-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
value: "true"
- name: prefetch-input
value: '{"type": "npm", "path": "."}'
- name: build-args-file
value: ".tekton/downstream-build-arguments.conf"
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/discovery-ui-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
value: "true"
- name: prefetch-input
value: '{"type": "npm", "path": "."}'
- name: build-args-file
value: ".tekton/downstream-build-arguments.conf"
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down
6 changes: 6 additions & 0 deletions .tekton/downstream-build-arguments.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
K8S_DESCRIPTION=Discovery UI
K8S_DISPLAY_NAME=discovery-ui
K8S_NAME=discovery/discovery-ui-rhel9
OCP_TAGS=discovery
QUIPUCORDS_BRANDED=true
REDHAT_COMPONENT=discovery-ui-container
19 changes: 12 additions & 7 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ COPY . .
RUN export UI_BRAND=${QUIPUCORDS_BRANDED}; npm run build

FROM registry.access.redhat.com/ubi9/nginx-122
ARG K8S_DESCRIPTION="Quipucords UI"
ARG K8S_DISPLAY_NAME="quipucords-ui"
ARG K8S_NAME="quipucords/quipucords-ui"
ARG OCP_TAG="quipucords"
ARG REDHAT_COMPONENT="quipucords-ui-container"
# change user - this is required to be able to create /licenses folder
USER root
# TODO: cachi2 doesn't officially support dnf yet
Expand All @@ -31,10 +36,10 @@ COPY deploy/nginx.conf /etc/nginx/nginx.conf.template
COPY deploy/entrypoint.sh /opt/app-root/.
CMD ["/bin/bash", "/opt/app-root/entrypoint.sh"]

LABEL com.redhat.component="discovery-ui-container" \
description="Discovery UI" \
io.k8s.description="Discovery UI" \
io.k8s.display-name="discovery-ui" \
io.openshift.tags="discovery" \
name="discovery/discovery-ui-rhel9" \
summary="Discovery UI"
LABEL com.redhat.component=${REDHAT_COMPONENT} \
description=${K8S_DESCRIPTION} \
io.k8s.description=${K8S_DESCRIPTION} \
io.k8s.display-name=${K8S_DISPLAY_NAME} \
io.openshift.tags=${OCP_TAGS} \
name=${K8S_NAME} \
summary=${K8S_DESCRIPTION}

0 comments on commit c1b3591

Please sign in to comment.