diff --git a/.konflux/Containerfile.plugin b/.konflux/Containerfile.plugin new file mode 100644 index 00000000..f3f006c9 --- /dev/null +++ b/.konflux/Containerfile.plugin @@ -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 " \ + 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..2aab0aa6 100644 --- a/.tekton/openshift-gitops-console-plugin-pull-request.yaml +++ b/.tekton/openshift-gitops-console-plugin-pull-request.yaml @@ -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. diff --git a/.tekton/openshift-gitops-console-plugin-push.yaml b/.tekton/openshift-gitops-console-plugin-push.yaml index 0277093f..22644e98 100644 --- a/.tekton/openshift-gitops-console-plugin-push.yaml +++ b/.tekton/openshift-gitops-console-plugin-push.yaml @@ -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.