Skip to content

Commit

Permalink
Create downstream container image for konflux
Browse files Browse the repository at this point in the history
Signed-off-by: nmirasch <[email protected]>
  • Loading branch information
nmirasch committed Dec 16, 2024
1 parent 33d3b86 commit 3f4974b
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .konflux/Containerfile.plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM registry.redhat.io/ubi8/nodejs-20-minimal:1-72 as builder

EXPOSE 8080

ADD . /usr/src/app
WORKDIR /usr/src/app
RUN yarn config set network-timeout 600000 -g
RUN yarn install && yarn build

FROM --platform=linux/amd64 registry.redhat.io/ubi8/httpd-24:1-345.1732637100

USER root
RUN chown -R 1001:0 /opt/app-root/src
USER 1001
RUN chmod g+rwx /opt/app-root/src

COPY --from=builder /usr/src/app/ssl.conf /etc/httpd/conf.d
COPY --from=builder /usr/src/app/dist /var/www/html/plugin

CMD run-httpd

LABEL \
name="openshift-gitops-1/gitops-rhel8-console-plugin" \
License="Apache 2.0" \
com.redhat.component="openshift-gitops-console-plugin-container" \
com.redhat.delivery.appregistry="false" \
release=${CI_CONTAINER_RELEASE} \
upstream-vcs-type="git" \
upstream-version=${CI_UPSTREAM_VERSION} \
upstream-vcs-ref="${COMMIT_SHA}" \
summary="Red Hat OpenShift GitOps Console Plugin" \
maintainer="William Tam <[email protected]>" \
io.openshift.tags="openshift,gitops-console-plugin" \
io.k8s.display-name="Red Hat OpenShift GitOps Console Plugin" \
io.k8s.description="Red Hat OpenShift GitOps Console Plugin" \
io.openshift.maintainer.product="Red Hat OpenShift GitOps" \
io.openshift.maintainer.component="William Tam <[email protected]>"
description="Red Hat OpenShift GitOps Console Plugin"

12 changes: 11 additions & 1 deletion .tekton/openshift-gitops-console-plugin-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ spec:
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/openshift-gitops-console-plugin:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: hermetic
value: "true"
- name: prefetch-input
value: '{"type": "gomod", "path": "."}'
- name: build-platforms
value:
- linux/x86_64
- linux/arm64
- linux/ppc64le
- linux/s390x
- name: dockerfile
value: Dockerfile
value: ./konflux/Containerfile.plugin
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down
12 changes: 11 additions & 1 deletion .tekton/openshift-gitops-console-plugin-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@ spec:
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/openshift-gitops-console-plugin:{{revision}}
- name: hermetic
value: "true"
- name: prefetch-input
value: '{"type": "gomod", "path": "."}'
- name: build-platforms
value:
- linux/x86_64
- linux/arm64
- linux/ppc64le
- linux/s390x
- name: dockerfile
value: Dockerfile
value: ./konflux/Containerfile.plugin
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down

0 comments on commit 3f4974b

Please sign in to comment.