Skip to content

Commit d858af0

Browse files
Merge pull request #84 from nmirasch/GITOPS-5881_konflux_enablement
Create downstream container image for konflux
2 parents 3165f23 + 41d044b commit d858af0

3 files changed

+86
-2
lines changed

Diff for: .konflux/Containerfile.plugin

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Copyright 2021 Red Hat
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# ------------------------------------------------------------------------
16+
17+
FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1734528986 AS builder
18+
19+
USER root
20+
21+
# Install Yarn
22+
RUN npm install --global yarn
23+
24+
COPY ["package.json", "yarn.lock", "./"]
25+
26+
RUN yarn install --no-progress --non-interactive
27+
28+
ADD . /usr/src/app
29+
WORKDIR /usr/src/app
30+
31+
RUN yarn install --network-timeout 600000 && \
32+
yarn cache clean
33+
34+
RUN yarn install --no-progress --non-interactive
35+
36+
COPY [".", "."]
37+
38+
RUN yarn build
39+
40+
####################################################################################################
41+
42+
FROM --platform=linux/amd64 registry.redhat.io/ubi9/httpd-24:9.5-1733127463
43+
USER root
44+
RUN chown -R 1001:0 /opt/app-root/src
45+
USER 1001
46+
RUN chmod g+rwx /opt/app-root/src
47+
48+
COPY --from=builder /usr/src/app/ssl.conf /etc/httpd/conf.d
49+
COPY --from=builder /usr/src/app/dist /var/www/html/plugin
50+
51+
CMD run-httpd
52+
53+
LABEL \
54+
name="openshift-gitops-1/gitops-console-plugin-rhel8" \
55+
License="Apache 2.0" \
56+
com.redhat.component="openshift-gitops-console-plugin-container" \
57+
com.redhat.delivery.appregistry="false" \
58+
release=${CI_CONTAINER_RELEASE} \
59+
upstream-vcs-type="git" \
60+
upstream-version=${CI_UPSTREAM_VERSION} \
61+
upstream-vcs-ref="${COMMIT_SHA}" \
62+
version=${CI_CONTAINER_VERSION} \
63+
summary="Red Hat OpenShift GitOps Console Plugin" \
64+
maintainer="William Tam <[email protected]>" \
65+
io.openshift.tags="openshift,gitops-console-plugin" \
66+
io.k8s.display-name="Red Hat OpenShift GitOps Console Plugin" \
67+
io.k8s.description="Red Hat OpenShift GitOps Console Plugin" \
68+
io.openshift.maintainer.product="Red Hat OpenShift GitOps" \
69+
io.openshift.maintainer.component="William Tam <[email protected]>" \
70+
description="Red Hat OpenShift GitOps Console Plugin"
71+
72+

Diff for: .tekton/openshift-gitops-console-plugin-pull-request.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ spec:
2626
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/openshift-gitops-console-plugin:on-pr-{{revision}}
2727
- name: image-expires-after
2828
value: 5d
29+
- name: build-platforms
30+
value:
31+
- linux/x86_64
32+
- linux/arm64
33+
- linux/ppc64le
34+
- linux/s390x
2935
- name: dockerfile
30-
value: Dockerfile
36+
value: .konflux/Containerfile.plugin
3137
pipelineSpec:
3238
description: |
3339
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.

Diff for: .tekton/openshift-gitops-console-plugin-push.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ spec:
2323
value: '{{revision}}'
2424
- name: output-image
2525
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/openshift-gitops-console-plugin:{{revision}}
26+
- name: build-platforms
27+
value:
28+
- linux/x86_64
29+
- linux/arm64
30+
- linux/ppc64le
31+
- linux/s390x
2632
- name: dockerfile
27-
value: Dockerfile
33+
value: .konflux/Containerfile.plugin
2834
pipelineSpec:
2935
description: |
3036
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.

0 commit comments

Comments
 (0)