Skip to content
Open
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
16 changes: 7 additions & 9 deletions .konflux/Containerfile.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@ FROM registry.access.redhat.com/ubi9/nodejs-22 AS builder

USER root

# Install Yarn
RUN npm install --global yarn
# Install pnpm
RUN npm install --global pnpm

COPY ["package.json", "yarn.lock", "./"]
COPY ["package.json", "pnpm-lock.yaml", "./"]

RUN yarn install --no-progress --non-interactive
RUN pnpm install --no-frozen-lockfile --ignore-scripts

ADD . /usr/src/app
WORKDIR /usr/src/app

RUN yarn install --network-timeout 600000 && \
yarn cache clean

RUN yarn install --no-progress --non-interactive
RUN pnpm install --no-frozen-lockfile && \
pnpm store prune

COPY [".", "."]

RUN yarn build
RUN pnpm build

####################################################################################################

Expand Down
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public-hoist-pattern[]=*types*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM docker.io/library/node:23 AS build

ADD . /usr/src/app
WORKDIR /usr/src/app
RUN yarn config set network-timeout 600000 -g
RUN yarn install && yarn build
RUN pnpm config set network-timeout 600000 -g
RUN pnpm install && pnpm build

FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/httpd-24

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Based on [Openshift Console dynamic plugin](https://github.com/openshift/console

In one terminal window, run:

1. `yarn install`
2. `yarn run start`
1. `pnpm install`
2. `pnpm run start`

In another terminal window, run:

Expand All @@ -30,15 +30,15 @@ spec:
termination: reencrypt
insecureEdgeTerminationPolicy: Allow
```
3. `yarn run start-console` (requires [Docker](https://www.docker.com) or [podman 3.2.0+](https://podman.io))
3. `pnpm run start-console` (requires [Docker](https://www.docker.com) or [podman 3.2.0+](https://podman.io))

This will run the OpenShift console in a container connected to the cluster
you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled.
Navigate to <http://localhost:9000/envdynamic> to see the running plugin.

#### Running start-console with Apple silicon and podman

If you are using podman on a Mac with Apple silicon, `yarn run start-console`
If you are using podman on a Mac with Apple silicon, `pnpm run start-console`
might fail since it runs an amd64 image. You can work around the problem with
[qemu-user-static](https://github.com/multiarch/qemu-user-static) by running
these commands:
Expand All @@ -54,8 +54,8 @@ systemctl reboot

In plugin directory, run

1. `yarn install`
2. `yarn run start`
1. `pnpm install`
2. `pnpm run start`

In your local `console/` directory

Expand Down
42 changes: 27 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"private": true,
"license": "Apache-2.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"http-server": "./http-server.sh ./dist",
"clean": "rm -rf dist",
"build": "yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack",
"build-dev": "yarn clean && yarn ts-node node_modules/.bin/webpack",
"start": "yarn ts-node node_modules/.bin/webpack serve",
"build": "pnpm clean && NODE_ENV=production pnpm ts-node node_modules/webpack-cli/bin/cli.js",
"build-dev": "pnpm clean && pnpm ts-node node_modules/webpack-cli/bin/cli.js",
"start": "pnpm ts-node node_modules/webpack-cli/bin/cli.js serve",
"start-console": "./start-console.sh",
"i18n": "i18next \"src/**/*.{js,jsx,ts,tsx}\" [-oc] -c i18next-parser.config.js",
"ts-node": "ts-node -O '{\"module\":\"commonjs\"}'",
Expand All @@ -25,13 +26,17 @@
"@patternfly/react-charts": "^8.4.0",
"@patternfly/react-core": "^6.4.0",
"@patternfly/react-data-view": "^6.4.0",
"@patternfly/react-component-groups": "^6.3.0",
"@patternfly/react-icons": "^6.4.0",
"@patternfly/react-styles": "^6.4.0",
"@patternfly/react-table": "^6.4.0",
"@patternfly/react-tokens": "6.4.0",
"@patternfly/react-topology": "^6.2.0",
"@svgr/webpack": "^8.1.0",
"@types/classnames": "^2.3.1",
"@types/dagre": "^0.7.53",
"@types/git-url-parse": "^9.0.0",
"@types/lodash": "^4.14.0",
"@types/node": "^17.0.21",
"@types/react": "17.0.91",
"@types/react-redux": "7.1.34",
Expand All @@ -58,34 +63,40 @@
"i18next-parser": "^3.3.0",
"lodash-es": "^4.17.23",
"marked": "15.0.12",
"mobx-react": "^7.6.0",
"prettier": "^2.6.0",
"prop-types": "15.8.x",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-i18next": "^11.7.3",
"react-router": "5.3.4",
"semver": "^7.0.0",
"sass": "^1.42.1",
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"ts-loader": "^9.5.1",
"ts-node": "^10.7.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typesafe-actions": "^4.4.2",
"typescript": "5.9.3",
"webpack": "^5.1.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.3"
},
"resolutions": {
"glob-parent": "^6.0.0",
"showdown": "^2.1.0",
"express": "5.2.1",
"@types/jest": "21.x",
"hosted-git-info": "^3.0.8",
"jquery": "4.0.0",
"lodash-es": "^4.17.23",
"minimist": "1.2.8",
"ua-parser-js": "^0.7.24",
"jest": "21.x",
"postcss": "^8.2.13"
"pnpm": {
"overrides": {
"glob-parent": "^5.1.2",
"showdown": "^2.1.0",
"express": "4.22.1",
"@types/jest": "21.x",
"hosted-git-info": "^3.0.8",
"jquery": "3.7.1",
"lodash-es": "^4.17.23",
"minimist": "1.2.8",
"ua-parser-js": "^0.7.24",
"jest": "21.x",
"postcss": "^8.2.13"
}
},
"consolePlugin": {
"name": "gitops-plugin",
Expand All @@ -106,6 +117,7 @@
"classnames": "^2.3.2",
"dagre": "^0.8.5",
"git-url-parse": "^13.1.0",
"lodash": "^4.18.1",
"react": "17.0.2",
"react-helmet": "^6.1.0",
"react-redux": "7.2.9",
Expand Down
Loading