diff --git a/.konflux/Containerfile.plugin b/.konflux/Containerfile.plugin new file mode 100644 index 00000000..a57361c1 --- /dev/null +++ b/.konflux/Containerfile.plugin @@ -0,0 +1,72 @@ +# Copyright 2021 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------ + +FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1734528986 AS builder + +USER root + +# Install Yarn +RUN npm install --global yarn + +COPY ["package.json", "yarn.lock", "./"] + +RUN yarn install --no-progress --non-interactive + +ADD . /usr/src/app +WORKDIR /usr/src/app + +RUN yarn install --network-timeout 600000 && \ + yarn cache clean + +RUN yarn install --no-progress --non-interactive + +COPY [".", "."] + +RUN yarn build + +#################################################################################################### + +FROM --platform=linux/amd64 registry.redhat.io/ubi9/httpd-24:9.5-1733127463 +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-console-plugin-rhel8" \ + 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}" \ + version=${CI_CONTAINER_VERSION} \ + summary="Red Hat OpenShift GitOps Console Plugin" \ + maintainer="William Tam " \ + 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 " \ + description="Red Hat OpenShift GitOps Console Plugin" + + diff --git a/.tekton/openshift-gitops-console-plugin-pull-request.yaml b/.tekton/openshift-gitops-console-plugin-pull-request.yaml index c76a58bf..995fd417 100644 --- a/.tekton/openshift-gitops-console-plugin-pull-request.yaml +++ b/.tekton/openshift-gitops-console-plugin-pull-request.yaml @@ -26,8 +26,14 @@ 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: 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. diff --git a/.tekton/openshift-gitops-console-plugin-push.yaml b/.tekton/openshift-gitops-console-plugin-push.yaml index 0277093f..d43416db 100644 --- a/.tekton/openshift-gitops-console-plugin-push.yaml +++ b/.tekton/openshift-gitops-console-plugin-push.yaml @@ -23,8 +23,14 @@ 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: 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.