Skip to content

Commit cea86b9

Browse files
feat: OCP 4.22 Breaking Changes
1 parent 969bc1f commit cea86b9

84 files changed

Lines changed: 3094 additions & 2629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ USER 0
77
ENV HUSKY=0
88

99
COPY web/package.json web/package-lock.json web/
10+
COPY web/patches/@openshift-console+dynamic-plugin-sdk+4.22.0-prerelease.2.patch web/patches/
1011
COPY Makefile Makefile
11-
RUN make install-frontend
12+
RUN make install-frontend-ci
13+
RUN make patch-frontend
1214

1315
COPY web/ web/
1416
RUN make build-frontend

Dockerfile.art

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ USER 0
1010
# use dependencies provided by Cachito
1111
ENV HUSKY=0
1212
ENV CYPRESS_INSTALL_BINARY=0
13-
RUN make install-frontend-ci && make build-frontend
13+
RUN make install-frontend-ci && make patch-frontend && make build-frontend
1414

1515
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS go-builder
1616

Dockerfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ USER 0
77
ENV HUSKY=0
88

99
COPY web/package.json web/package-lock.json web/
10+
COPY web/patches/@openshift-console+dynamic-plugin-sdk+4.22.0-prerelease.2.patch web/patches/
1011
COPY Makefile Makefile
1112
RUN make install-frontend-ci
13+
RUN make patch-frontend
1214

1315
COPY web/ web/
1416
RUN make build-frontend

Dockerfile.dev-mcp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ RUN make update-plugin-name
1616

1717
ENV I18N_NAMESPACE="plugin__monitoring-console-plugin"
1818

19-
RUN make install-frontend
19+
RUN make install-frontend-ci
20+
RUN make patch-frontend
2021
RUN make build-frontend
2122

2223
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as go-builder

Dockerfile.konflux

Lines changed: 0 additions & 57 deletions
This file was deleted.

Dockerfile.mcp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ USER 0
66

77
ENV HUSKY=0
88
COPY web/package*.json web/
9+
COPY web/patches/@openshift-console+dynamic-plugin-sdk+4.22.0-prerelease.2.patch web/patches/
910
COPY Makefile Makefile
1011
RUN cd web && npm ci --legacy-peer-deps --ignore-scripts
12+
RUN make patch-frontend
1113

1214
COPY web/ web/
1315
COPY config/ config/

Dockerfile.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ USER 0
55
WORKDIR /usr/src/app
66

77
COPY web/package*.json web/
8+
COPY web/patches/@openshift-console+dynamic-plugin-sdk+4.22.0-prerelease.2.patch web/patches/
89
COPY Makefile Makefile
910

1011
RUN make install-frontend-ci
12+
RUN make patch-frontend
1113

1214
COPY web/. web/.
1315
COPY scripts/. scripts/.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,7 @@ podman-cross-build-push: podman-cross-build
129129
.PHONY: test-translations
130130
test-translations:
131131
./scripts/test-translations.sh
132+
133+
.PHONY: patch-frontend
134+
patch-frontend:
135+
cd web && npm run postinstall

devspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dev:
3636
# Use the instance selector that CMO & helm add
3737
app.kubernetes.io/component: monitoring-plugin
3838
# Replace the container image with this dev-optimized image (allows to skip image building during development)
39-
devImage: quay.io/rh-ee-pyurkovi/monitoring-plugin:devspace-2
39+
devImage: quay.io/rh-ee-pyurkovi/monitoring-plugin:v4.19-devspace
4040
# Sync files between the local filesystem and the development container
4141
sync:
4242
- path: ./web/dist:/opt/app-root/web/dist

web/eslint.config.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import { defineConfig } from 'eslint/config';
2+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
3+
import prettier from 'eslint-plugin-prettier';
4+
import react from 'eslint-plugin-react';
5+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
6+
import globals from 'globals';
7+
import tsParser from '@typescript-eslint/parser';
8+
import path from 'node:path';
9+
import { fileURLToPath } from 'node:url';
10+
import js from '@eslint/js';
11+
import { FlatCompat } from '@eslint/eslintrc';
12+
13+
const __filename = fileURLToPath(import.meta.url);
14+
const __dirname = path.dirname(__filename);
15+
const compat = new FlatCompat({
16+
baseDirectory: __dirname,
17+
recommendedConfig: js.configs.recommended,
18+
allConfig: js.configs.all,
19+
});
20+
21+
export default defineConfig([
22+
{
23+
extends: fixupConfigRules(
24+
compat.extends(
25+
'eslint:recommended',
26+
'plugin:react/recommended',
27+
'plugin:react-hooks/recommended',
28+
'plugin:@typescript-eslint/recommended',
29+
'plugin:react/jsx-runtime',
30+
'prettier',
31+
),
32+
),
33+
34+
plugins: {
35+
prettier,
36+
react: fixupPluginRules(react as any),
37+
'@typescript-eslint': fixupPluginRules(typescriptEslint as any),
38+
},
39+
40+
languageOptions: {
41+
globals: {
42+
...globals.browser,
43+
},
44+
45+
parser: tsParser,
46+
ecmaVersion: 2021,
47+
sourceType: 'module',
48+
49+
parserOptions: {
50+
ecmaFeatures: {
51+
jsx: true,
52+
},
53+
},
54+
},
55+
56+
settings: {
57+
react: {
58+
version: 'detect',
59+
},
60+
},
61+
62+
rules: {
63+
'prettier/prettier': ['error'],
64+
65+
'max-len': [
66+
'error',
67+
{
68+
code: 100,
69+
ignoreStrings: true,
70+
ignoreUrls: true,
71+
},
72+
],
73+
74+
'no-console': ['error'],
75+
'react/display-name': 'off',
76+
'react/prop-types': 'off',
77+
'react-hooks/set-state-in-effect': 'off',
78+
'react-hooks/set-state-in-render': 'off',
79+
'react-hooks/incompatible-library': 'off',
80+
'@typescript-eslint/no-explicit-any': 'off',
81+
},
82+
},
83+
]);

0 commit comments

Comments
 (0)