From e686c3b856faf6bfbd66ca011b3f6d8f77402682 Mon Sep 17 00:00:00 2001 From: Anwesha Palit Date: Wed, 25 Feb 2026 15:34:37 +0530 Subject: [PATCH] fix konflux build --- .gitignore | 3 ++- .konflux/dockerfiles/console-plugin.Dockerfile | 11 +++++------ ...in-main_ocp_4.22-console-plugin-pull-request.yaml} | 2 +- ...ole-plugin-main_ocp_4.22-console-plugin-push.yaml} | 2 +- .yarnrc.yml | 10 +++++++++- 5 files changed, 18 insertions(+), 10 deletions(-) rename .tekton/{console-plugin-next-console-plugin-pull-request.yaml => console-plugin-main_ocp_4.22-console-plugin-pull-request.yaml} (96%) rename .tekton/{console-plugin-next-console-plugin-push.yaml => console-plugin-main_ocp_4.22-console-plugin-push.yaml} (96%) diff --git a/.gitignore b/.gitignore index e5a4f8a8..6b9aaaeb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ integration-tests/screenshots yarn-error.log .DS_Store *.pem -integration-tests/cypress-a11y-report.json \ No newline at end of file +integration-tests/cypress-a11y-report.json +.yarn/ \ No newline at end of file diff --git a/.konflux/dockerfiles/console-plugin.Dockerfile b/.konflux/dockerfiles/console-plugin.Dockerfile index 7699a899..8a400686 100644 --- a/.konflux/dockerfiles/console-plugin.Dockerfile +++ b/.konflux/dockerfiles/console-plugin.Dockerfile @@ -1,5 +1,5 @@ ARG BUILDER=registry.redhat.io/ubi9/nodejs-22@sha256:04e9f3020875f3f6e99b9a96fe55e35e1b5c38974a1765a19153102a90abf967 -ARG RUNTIME=registry.redhat.io/ubi9/nginx-124@sha256:aa73fdb10af2bf24611ba714a412c2e65cec88a00eee628a0f2a75e564ec18f2 +ARG RUNTIME=registry.redhat.io/ubi9/nginx-124@sha256:ece0c2d70199f0bcd3316d6913ef4b8e815d0229693156dee4bad8d69b13edc6 FROM $BUILDER AS builder-ui @@ -7,12 +7,11 @@ WORKDIR /go/src/github.com/openshift-pipelines/console-plugin COPY . . #Install Yarn RUN if [[ -d /cachi2/output/deps/npm/ ]]; then \ - npm install -g /cachi2/output/deps/npm/"$YARN_PKG" \ + npm install -g /cachi2/output/deps/npm/yarnpkg-cli-dist-4.6.0.tgz; \ YARN_ENABLE_NETWORK=0; \ else \ - npm install -g corepack; \ - corepack enable ;\ - corepack prepare yarn@4.6.0 --activate; \ + echo "ERROR: Hermetic npm deps not injected"; \ + exit 1; \ fi # Install dependencies & build @@ -21,7 +20,7 @@ RUN CYPRESS_INSTALL_BINARY=0 yarn install --immutable && \ yarn build FROM $RUNTIME -ARG VERSION=console-plugin-main +ARG VERSION=console-plugin-main_ocp_4.22 COPY --from=builder-ui /go/src/github.com/openshift-pipelines/console-plugin/dist /usr/share/nginx/html COPY --from=builder-ui /go/src/github.com/openshift-pipelines/console-plugin/nginx.conf /etc/nginx/nginx.conf diff --git a/.tekton/console-plugin-next-console-plugin-pull-request.yaml b/.tekton/console-plugin-main_ocp_4.22-console-plugin-pull-request.yaml similarity index 96% rename from .tekton/console-plugin-next-console-plugin-pull-request.yaml rename to .tekton/console-plugin-main_ocp_4.22-console-plugin-pull-request.yaml index a289c6b9..39701654 100644 --- a/.tekton/console-plugin-next-console-plugin-pull-request.yaml +++ b/.tekton/console-plugin-main_ocp_4.22-console-plugin-pull-request.yaml @@ -36,7 +36,7 @@ spec: value: .konflux/dockerfiles/console-plugin.Dockerfile - name: prefetch-input value: | - {"type": "rpm", "path": ".konflux/rpms"} + [{"type": "yarn"}, {"type": "npm", "path": ".konflux/npm"}] pipelineRef: name: docker-build-ta taskRunTemplate: diff --git a/.tekton/console-plugin-next-console-plugin-push.yaml b/.tekton/console-plugin-main_ocp_4.22-console-plugin-push.yaml similarity index 96% rename from .tekton/console-plugin-next-console-plugin-push.yaml rename to .tekton/console-plugin-main_ocp_4.22-console-plugin-push.yaml index 7c34111b..86fd7b08 100644 --- a/.tekton/console-plugin-next-console-plugin-push.yaml +++ b/.tekton/console-plugin-main_ocp_4.22-console-plugin-push.yaml @@ -33,7 +33,7 @@ spec: value: .konflux/dockerfiles/console-plugin.Dockerfile - name: prefetch-input value: | - {"type": "rpm", "path": ".konflux/rpms"} + [{"type": "yarn"}, {"type": "npm", "path": ".konflux/npm"}] pipelineRef: name: docker-build-ta taskRunTemplate: diff --git a/.yarnrc.yml b/.yarnrc.yml index 4605c32f..1f0cf31b 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,6 +1,14 @@ -# .yarnrc.yml nodeLinker: node-modules +supportedArchitectures: + os: + - linux + cpu: + - x64 + - arm64 + - s390x + - ppc64 + # Force packages to use the same webpack instance packageExtensions: "@openshift-console/dynamic-plugin-sdk-webpack@*":