Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create downstream container image for konflux #84

Merged
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
72 changes: 72 additions & 0 deletions .konflux/Containerfile.plugin
Original file line number Diff line number Diff line change
@@ -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 <[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"


8 changes: 7 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,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.
Expand Down
8 changes: 7 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,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.
Expand Down