Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐾 Update to PF5 - part III #1336

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
node-version: 20

- name: Install dependencies
run: npm install
run: yarn install

- name: Lint, eslint and stylelint
run: npm run lint
run: yarn lint

- name: Lint, test i18n files
run: npm run test:i18n
run: yarn test:i18n

- name: Test build
run: npm run build
run: yarn build

- name: Test
run: npm run test:coverage
run: yarn test:coverage

- name: Test coverage
uses: codecov/codecov-action@v4
Expand All @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Run pre e2e test tasks
run: npm run e2e:pre-test
run: yarn e2e:pre-test

- name: Run cypress
uses: cypress-io/github-action@v6
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Forklift console plugin is managed by Migration Toolkit for Virtualization opera

## Installation

To get started, clone the repo to your development workstation and install the required dependencies locally with NPM.
To get started, clone the repo to your development workstation and install the required dependencies locally with yarn.

``` bash
git clone https://github.com/kubev2v/forklift-console-plugin.git
cd forklift-console-plugin
npm install
yarn install
```

## Quick start
Expand All @@ -38,7 +38,7 @@ With a user logged in to existing Kubernetes or Openshift environment with Forkl
# for example:
# export INVENTORY_SERVER_HOST=https://virt-konveyor-forklift.apps.example.com
# - To close the console server run:
# npm run console:stop
# yarn console:stop

# Setting the console image and forklift setvice URLs as enviorment variables:
#
Expand All @@ -49,13 +49,13 @@ export SERVICES_API_SERVER_HOST=https://virt-konveyor-forklift.apps.<your calust
export CONSOLE_IMAGE=quay.io/openshift/origin-console:4.15

# Run the web console locally (uses the enviorment variables we defined above)
npm run console
yarn console

# If this is the first time running, npm run build will build the required dependencies
npm run build
# If this is the first time running, yarn build will build the required dependencies
yarn build

# Start the plugin in development mode
npm run start
yarn start
```

## Setup a local cluster for development
Expand All @@ -64,7 +64,7 @@ Forklift console plugin requires the user to be logged into an openshift or kube

``` bash
# Setup a kind cluster with Forklift operator and an OKD web console
npm run cluster:up
yarn cluster:up

# Example: setup a local KinD cluster with ovirt mock provider
# [ options: --with-all-providers --with-ovirt-provider, --with-vmware-provider, --with-openstack-provider]
Expand All @@ -73,10 +73,10 @@ npm run cluster:up
# Note II: mock providers requires NFS server running, look at forkliftci documentation for more details.
# See: forkliftci/cluster/providers/utils/install_nfs.sh
git clone [email protected]:kubev2v/forkliftci.git ./ci/forkliftci
npm run cluster:up -- --with-ovirt-provider
yarn cluster:up -- --with-ovirt-provider

# run cleanup to stop and delete the cluster.
npm run cluster:delete
yarn cluster:delete
```

## Learn more
Expand Down
3 changes: 2 additions & 1 deletion build/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ WORKDIR /opt/app-root/src/app

# Run install as supper tux
USER 0
RUN npm ci && npm run build
RUN command -v yarn || npm i -g yarn
RUN yarn install --frozen-lockfile --ignore-engines && yarn build

# Web server container
FROM registry.access.redhat.com/ubi9/nginx-122
Expand Down
2 changes: 1 addition & 1 deletion ci/create-forklift-user-account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ echo export TOKEN_ADMIN=...
echo export BRIDGE_K8S_AUTH_BEARER_TOKEN=$\{TOKEN_ADMIN \| TOKEN_USER \| TOKEN_READER\}
echo
echo before starting the bridge
echo npm run console
echo yarn console
4 changes: 2 additions & 2 deletions ci/start-console.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ CONSOLE_PORT=${CONSOLE_PORT:-9000}
# Look for forklift routes
if oc_available_loggedin; then
routes=$(oc get routes -A -o template --template='{{range .items}}{{.spec.host}}{{"\n"}}{{end}}' 2>/dev/null || true)
INVENTORY_SERVER_HOST=${INVENTORY_SERVER_HOST:-$(echo "$routes" | grep forklift-inventory)}
SERVICES_API_SERVER_HOST=${SERVICES_API_SERVER_HOST:-$(echo "$routes" | grep forklift-services)}
INVENTORY_SERVER_HOST=${INVENTORY_SERVER_HOST:-$(echo "$routes" | grep forklift-inventory || true)}
SERVICES_API_SERVER_HOST=${SERVICES_API_SERVER_HOST:-$(echo "$routes" | grep forklift-services || true)}
fi

# Default to localhost if no route found
Expand Down
2 changes: 1 addition & 1 deletion ci/test-i18n.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

npm run i18n
yarn i18n
GIT_STATUS="$(git status --short --untracked-files -- packages/forklift-console-plugin/locales)"
if [ -n "$GIT_STATUS" ]; then
echo "i18n files are not up to date. Commit them to fix."
Expand Down
Loading
Loading