- 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:beta
(npm run start
for the non-beta release). - Local version of the application is available at https://stage.foo.redhat.com:1337/beta/openshift/insights/advisor (https://stage.foo.redhat.com:1337/openshift/insights/advisor for the non-beta release).
- Set the
env
field in dev.webpack.config.js toprocess.env.BETA ? 'prod-beta' : 'prod-stable'
. - Run development server with
npm run start:beta
(npm run start
for the non-beta release). - Local version of the application is available at https://prod.foo.redhat.com:1337/beta/openshift/insights/advisor (https://prod.foo.redhat.com:1337/openshift/insights/advisor for the non-beta release).
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:beta: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.
Any push to the following branches will trigger a build in ocp-advisor-frontend-build which will deploy to corresponding environment.
Push to branch in this repo | Updated branch in build repo | Environment | Available at |
---|---|---|---|
master | qa-beta | stage beta | https://console.stage.redhat.com/beta |
master-stable | qa-stable | stage stable | https://console.stage.redhat.com |
prod-beta | prod-beta | production beta | https://console.redhat.com/beta |
prod-stable | prod-stable | production stable | https://console.redhat.com |
To be finally deployed in production, all the features have to pass the following environments (the order is preserved): stage beta, production beta, and production stable. Integration tests are run against stage beta and production stable environments. Repository releases are automatically created once the stage beta (master branch) is updated.
- ocp-advisor-frontend uses Travis to deploy the webpack build to another Github repo defined in
.travis.yml
- Travis uploads results to RedHatInsight's codecov account. To change the account, modify CODECOV_TOKEN on https://travis-ci.com/.