Codeowner: @mateuszRybczonek Consulted: None Informed: @robbiecarlton
This project contains git submodules, remember to initialize submodules after cloning.
git clone https://github.com/Holo-Host/host-console-ui.git
Initialize submodules:
git submodule init
To fetch the submodules for an existing branch you can execute:
git submodule update --remote
The submodules default to the develop branch.
Install required packages
yarn
Create the .env file in the root folder and add following value.
Set VITE_HOLOPORT_URL value in .env file to the HoloPort URL.
VITE_HOLOPORT_URL=your_holoport_url_here
e.g.
VITE_HOLOPORT_URL=https://00000000000000000000.holohost.dev
Start UI server
yarn serve
Using this command, all requests to localhost:8080/api/ are forwarded to the holoport. This is really helpful for development/testing.
If you want to run it against mocked data you will need to run it as below.
Remove VITE_HOLOPORT_URL value from .env file.
Set VITE_HPOS_PORT=4567 in .env file.
Run mock HPOS API server
yarn start-mock-hpos-api
Start UI server in another terminal
yarn dev
The login email and password for this server are in the package.json script
test@test.com
and
asasas
yarn test
yarn build
yarn lint
See Token authentication description.
To deploy a new version to dev environment you need to update the appropriate rev value in the holo-nixpkgs repo.
Replace rev with your latest commit hash.
Run the command below from the root of the holo-nixpkgs repo:
nix-build . -A host-console-ui
It should fail with a message like below:
hash mismatch in fixed-output derivation '/nix/store/....:
specified: sha256-...
got: sha256-...
Copy the got value to the sha256 in the holo-nixpkgs/overlays/holo-nixpkgs/host-console-ui/default.nix file.
Create a PR off develop, merge it and wait for hydra to deploy it. You can check the status in the link below.
https://hydra.holo.host/project/holo-nixpkgs
In the meantime run regression tests on GitHub. To do that:
- note your PR number
- go to the Actions tab
- select the
Holo Regression Testworkflow and clickRun workflow Use workflow fromshould be set todevelopEnter the PR numbershould be set to your PR number- click
Run workflow - wait for the tests to finish
Once the build is done, all holoports that watch for develop channel should pick up the change and update the version of the app.