Skip to content

Commit

Permalink
Merge pull request #84 from nmirasch/GITOPS-5881_konflux_enablement
Browse files Browse the repository at this point in the history
Create downstream container image for konflux
  • Loading branch information
iam-veeramalla authored Jan 8, 2025
2 parents 3165f23 + 41d044b commit d858af0
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
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

0 comments on commit d858af0

Please sign in to comment.