- Follow this Initial etc/hosts setup from frontend-starter-app
- Make sure you have
Node.js
andnpm
installed. Check the currently maintained versions at https://nodejs.org/en/about/releases/. - Make sure you are using Red Hat proxy.
- Install dependencies with
npm install
. - Run development server with
npm run start
then in terminal choose stage and preview or stable environment. - Local version of the application is available at https://stage.foo.redhat.com:1337/openshift/insights/advisor.
- Run development server with
npm run start
then in terminal choose prod and preview or stable environment. - Local version of the application is available at https://prod.foo.redhat.com:1337/openshift/insights/advisor.
You can use the mocked version of Insights Results Aggregator (or Smart Proxy) API.
- Clone https://github.com/RedHatInsights/insights-results-aggregator-mock.
- Follow "How to build the service" and "How to start the service."
- Once having IRA-mock server running locally, run the OCP Advisor with
npm run start:mock
.
ccx_rules_ocp.external.rules.nodes_requirements_check|NODES_MINIMUM_REQUIREMENTS_NOT_MET
ccx_rules_ocp.external.rules.vsphere_upi_machine_is_in_phase|VSPHERE_UPI_MACHINE_WITH_NO_RUNNING_PHASE
ccx_rules_ocp.external.rules.machineconfig_stuck_by_node_taints|NODE_HAS_TAINTS_APPLIED
ccx_rules_ocp.external.rules.ocp_version_end_of_life|OCP4X_EOL_APPROACHING
ccx_rules_ocp.external.rules.ocp_version_end_of_life|OCP4X_BEYOND_EOL
Cypress and Jest are used as the testing frameworks.
- Run
npm run test
to execute unit-test suite (Jest + Cypress component testing). - Run
npx cypress open --component
to open Cypress in the component tesing mode.
The stage environment uses and always deploys the last commit available on the master branch. The production environment deploys the commit with a hash listed in the app-interface deploy configuration file.
- Travis uploads results to RedHatInsight's codecov account. To change the account, modify CODECOV_TOKEN on https://travis-ci.com/.