Skip to content

Commit

Permalink
Initial PF5 update
Browse files Browse the repository at this point in the history
Signed-off-by: yaacov <[email protected]>
  • Loading branch information
yaacov committed Sep 27, 2024
1 parent 47ec10c commit 4f6d8f8
Show file tree
Hide file tree
Showing 175 changed files with 14,006 additions and 32,870 deletions.
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

0 comments on commit 4f6d8f8

Please sign in to comment.