Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/prod-beta' into prod-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed Jun 21, 2022
2 parents 5405c2b + bbef3b8 commit 5c9aaee
Show file tree
Hide file tree
Showing 225 changed files with 23,626 additions and 6,306 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"prettier",
"patternfly-react",
"simple-import-sort",
"sort-keys-fix"
"sort-keys-fix",
"testing-library"
],
"extends": [
"eslint:recommended",
Expand Down Expand Up @@ -42,6 +43,10 @@
"beforeEach": "readonly"
},
"rules": {
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off",
"formatjs/enforce-default-message": "error",
"formatjs/enforce-description": "error",
"formatjs/enforce-id": "error",
Expand Down Expand Up @@ -132,5 +137,9 @@
"rules": {
"sort-keys-fix/sort-keys-fix": "error"
}
}, {
// 3) Now we enable eslint-plugin-testing-library rules or preset only for matching files!
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
"extends": ["plugin:testing-library/react"]
}]
}
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
sudo: false
node_js:
- "14"
- "16"
cache: yarn
before_script: yarn global add codecov @yarnpkg/lockfile
script:
Expand Down
2 changes: 1 addition & 1 deletion .travis/custom_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
set -x

# If current dev branch is master, push to build repo stage-beta
# If current dev branch is main, push to build repo stage-beta
if [[ "${TRAVIS_BRANCH}" = "master" || "${TRAVIS_BRANCH}" = "main" ]]; then
.travis/release.sh "stage-beta"
fi
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,27 @@ User interface is based on Patternfly [![Patternfly][pf-logo]][patternfly]
To submit an issue, please visit https://issues.redhat.com/projects/COST/

## Requirements
* [NodeJS v14+][nodejs]
* [NodeJS v16+][nodejs]
* [yarn 1.22+][yarn]

## Setup /etc/hosts entries (do this once)

Edit the /etc/hosts file and add the following entries
```
127.0.0.1 prod.foo.redhat.com
127.0.0.1 stage.foo.redhat.com
```

Alternatively, run the [patch-etc-hosts.sh][patch-etc-hosts] script from the insights-proxy repo
```
sudo bash scripts/patch-etc-hosts.sh
```

## Getting Started
1. Install requirements listed above.
2. Clone the repository, and open a terminal in the base of this project.
3. Run the command `yarn install` to install all the dependencies.
2. Setup /etc/hosts entries listed above.
3. Clone the repository, and open a terminal in the base of this project.
4. Run the command `yarn install` to install all the dependencies.

## Building
```
Expand All @@ -29,7 +43,7 @@ yarn test
## Manifest
Produces a file used by product security for vulnerability and compliance tracking.
```
yarn update:manifest
yarn manifest:update
```

## Running Koku UI against a hosted Koku API, using webpack proxy
Expand Down Expand Up @@ -131,6 +145,10 @@ Follow the [steps](#koku-api) to run a local Koku API instance
http://localhost:1337/beta/settings/applications/cost-management
```

## Releasing Koku UI

This [release][release-doc] doc describes how to release the UI to each staging environment.

## Useful Links

#### Libs
Expand All @@ -148,7 +166,7 @@ http://localhost:1337/beta/settings/applications/cost-management
* [Route](https://reacttraining.com/react-router/web/api/Route)
* [React I18Next](https://react.i18next.com/) - React Wrapper for i18next
* [PatternFly React 4](https://patternfly-react.netlify.com/)
* [Source](https://github.com/patternfly/patternfly-react/tree/master/packages) - `react-*/**`
* [Source](https://github.com/patternfly/patternfly-react/tree/main/packages) - `react-*/**`
* [PRS](https://github.com/patternfly/patternfly-react/pulls?q=is%3Aopen+is%3Apr+label%3APF4)
* [Issues](https://github.com/patternfly/patternfly-react/issues?q=is%3Aopen+is%3Aissue+label%3APF4)

Expand Down Expand Up @@ -188,8 +206,10 @@ http://localhost:1337/beta/settings/applications/cost-management
[build-badge]: https://img.shields.io/travis/project-koku/koku-ui.svg?style=for-the-badge
[koku-readme]: https://github.com/project-koku/koku#readme
[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui.svg?longCache=true&style=for-the-badge
[license]: https://github.com/project-koku/koku-ui/blob/master/LICENSE
[license]: https://github.com/project-koku/koku-ui/blob/main/LICENSE
[nodejs]: https://nodejs.org/en/
[patch-etc-hosts]: https://github.com/RedHatInsights/insights-proxy/blob/master/scripts/patch-etc-hosts.sh
[pf-logo]: https://www.patternfly.org/v4/images/logo.4189e7eb1a0741ea2b3b51b80d33c4cb.svg
[patternfly]: https://www.patternfly.org/
[release-doc]: https://github.com/project-koku/koku-ui/blob/main/release.md
[yarn]: https://yarnpkg.com/en/
2 changes: 1 addition & 1 deletion archive/utils/permissions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// For resource types, see https://github.com/project-koku/koku/blob/master/koku/koku/rbac.py#L37-L43
// For resource types, see https://github.com/project-koku/koku/blob/main/koku/koku/rbac.py#L37-L43

import { paths, routes } from 'routes';

Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ module.exports = {
roots: ['<rootDir>/src'],
snapshotSerializers: ['enzyme-to-json/serializer'],
testURL: 'http://localhost/',
testTimeout: 30000,
};
Loading

0 comments on commit 5c9aaee

Please sign in to comment.