Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft Release v2.X.X #942

Merged
merged 23 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
94a12d5
refactor(authentication): ent-4899 align hook components (#921)
cdcabrera Apr 25, 2022
d14d9b8
refactor(bannerMessages): ent-4899 align hook components (#926)
cdcabrera Apr 28, 2022
e51826e
chore(deps): bump codecov/codecov-action from 2.1.0 to 3.1.0 (#929)
dependabot[bot] May 3, 2022
8104be9
chore(build): ephemeral envs onboarding (#928)
mirekdlugosz May 6, 2022
dba53a6
chore(build): npm updates (#930)
cdcabrera May 6, 2022
e665ad1
chore(build): ephemeral env frontend.yaml (#932)
mirekdlugosz May 23, 2022
a66d839
feat(toolbarFieldBillingProvider): ent-4689 select, services (#893)
cdcabrera Feb 17, 2022
653ec72
fix(rhosak): ent-4689 convert non-metric (#893)
cdcabrera May 18, 2022
0d667a9
fix(toolbarFieldBillingProvider): ent-4689 tally query (#894)
cdcabrera May 23, 2022
d6f396a
feat(rhosak): ent-4689 activate billing provider (#894)
cdcabrera May 23, 2022
e008513
fix(rhosak): ent-4689 none, unknown billing provider (#936)
cdcabrera May 24, 2022
5407e30
chore(build): move ephemeral scripts to deploy dir (#935)
mirekdlugosz May 25, 2022
708f2e5
fix(rhosak): ent-4982 storage GiB as GB hours to months (#934)
cdcabrera May 25, 2022
95ab0fb
chore(testing): ephemeral envs, skip dist check (#937)
cdcabrera May 25, 2022
6b702ee
chore(testing): allow skipping individual tests (#937)
cdcabrera May 25, 2022
1b0412e
build(dev,proxy,prod): remove unused html template (#937)
cdcabrera May 25, 2022
112bc5d
fix(i18n): ent-5022 allow empty string context value (#939)
cdcabrera May 25, 2022
2ae4ff6
fix(inventoryCard): ent-5022 pass meta response for configs (#939)
cdcabrera May 25, 2022
e8ebe23
fix(rhosak): ent-5022 subscription type column activated (#939)
cdcabrera May 25, 2022
10a94bd
fix(rhosak): ent-4982 storage GiB as GB hours to months (#943)
cdcabrera Jun 2, 2022
078f91a
fix(rhosak): ent-4982 activate sort, storage GiB months (#945)
cdcabrera Jun 13, 2022
9a722ba
fix(rhsmTransformers): ent-5121 hide graph future dates (#948)
cdcabrera Jun 24, 2022
6dee80a
refactor(inventoryCardSubscriptions): ent-5129 camel to snake (#949)
cdcabrera Jun 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"mockWindowLocation": "readonly",
"shallowHook": "readonly",
"shallowHookComponent": "readonly",
"shallowHookWrapper": "readonly"
"shallowHookWrapper": "readonly",
"skipIt": "readonly"
},
"rules": {
"arrow-parens": [
Expand Down Expand Up @@ -74,6 +75,10 @@
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"jest/no-done-callback": 0,
"jest/no-standalone-expect": [
2,
{ "additionalTestBlockFunctions": ["skipIt"] }
],
"jest/prefer-to-have-length": 0,
"jsdoc/check-tag-names": [
2,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
}
- name: Code coverage
if: ${{ success() }}
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.0
- name: Confirm beta integration
if: ${{ success() }}
uses: actions/github-script@v6
Expand Down
6 changes: 0 additions & 6 deletions config/build.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const fedModulePlugin = require('@redhat-cloud-services/frontend-components-conf
const { setupWebpackDotenvFilesForEnv } = require('./build.dotenv');
const { dependencies } = require('../package.json');

const setHtmlPlugin = () => ({
title: process.env.REACT_APP_UI_DISPLAY_NAME,
template: join(process.env._BUILD_STATIC_DIR, 'index.html')
});

const setReplacePlugin = () => [
{
pattern: /%([A-Z_]+)%/g,
Expand Down Expand Up @@ -62,6 +57,5 @@ const setCommonPlugins = () => {

module.exports = {
setCommonPlugins,
setHtmlPlugin,
setReplacePlugin
};
11 changes: 11 additions & 0 deletions config/jest.setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ setupDotenvFilesForEnv({ env: process.env.NODE_ENV });
*/
configure({ adapter: new Adapter() });

/**
* Conditionally skip "it" test statements.
* Ex:
* skipIt(true)('should do a thing...', () => { ... });
*
* @param {*|boolean} value Any truthy value, typically used with environment variables
*
* @returns {*|jest.It}
*/
global.skipIt = value => (value && it?.skip) || it;

/**
* Emulate for component checks
*/
Expand Down
3 changes: 1 addition & 2 deletions config/webpack.dev.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = require('@redhat-cloud-services/frontend-components-config');
const { setHtmlPlugin, setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setupDotenvFilesForEnv } = require('./build.dotenv');
const { setDevRoutes } = require('./spandx.config');

Expand All @@ -16,7 +16,6 @@ const { config: webpackConfig, plugins } = config({
routes: setDevRoutes(),
standalone: true,
useProxy: false,
htmlPlugin: setHtmlPlugin(),
replacePlugin: setReplacePlugin()
});

Expand Down
3 changes: 1 addition & 2 deletions config/webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const config = require('@redhat-cloud-services/frontend-components-config');
const { setHtmlPlugin, setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setupDotenvFilesForEnv } = require('./build.dotenv');

const {
Expand All @@ -12,7 +12,6 @@ const {
const { config: webpackConfig, plugins } = config({
rootFolder: _BUILD_RELATIVE_DIRNAME,
deployment: (/beta/.test(BETA_PREFIX) && 'beta/apps') || 'apps',
htmlPlugin: setHtmlPlugin(),
replacePlugin: setReplacePlugin()
});

Expand Down
3 changes: 1 addition & 2 deletions config/webpack.proxy.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = require('@redhat-cloud-services/frontend-components-config');
const { setHtmlPlugin, setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setReplacePlugin, setCommonPlugins } = require('./build.plugins');
const { setupDotenvFilesForEnv } = require('./build.dotenv');
const { setProxyRoutes } = require('./spandx.config');

Expand Down Expand Up @@ -28,7 +28,6 @@ const { config: webpackConfig, plugins } = config({
routes: setProxyRoutes({ DEV_PORT, BETA_PREFIX }),
standalone: false,
useProxy: true,
htmlPlugin: setHtmlPlugin(),
replacePlugin: setReplacePlugin()
});

Expand Down
36 changes: 36 additions & 0 deletions deploy/build_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# --------------------------------------------
# Export vars for helper scripts to use
# --------------------------------------------
# name of app-sre "application" folder this component lives in; needs to match for quay
export COMPONENT="rhsm"
# IMAGE should match the quay repo set by app.yaml in app-interface
export IMAGE="quay.io/cloudservices/curiosity-frontend"
export APP_NAME=`node -e 'console.log(require("./package.json").insights.appname)'`
export APP_ROOT=$(pwd)
export NODE_BUILD_VERSION=`node -e 'console.log(require("./package.json").engines.node.match(/(\d+)\.\d+\.\d+/)[1])'`
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master

# --------------------------------------------
# Options that must be configured by app owner
# --------------------------------------------
IQE_PLUGINS="curiosity"
IQE_MARKER_EXPRESSION="smoke"
IQE_FILTER_EXPRESSION=""

set -exv
# source is preferred to | bash -s in this case to avoid a subshell
source <(curl -sSL $COMMON_BUILDER/src/frontend-build.sh)
BUILD_RESULTS=$?

# Stubbed out for now
mkdir -p $WORKSPACE/artifacts
cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml
<testsuite tests="1">
<testcase classname="dummy" name="dummytest"/>
</testsuite>
EOF

# teardown_docker
exit $BUILD_RESULTS
82 changes: 82 additions & 0 deletions deploy/frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: v1
kind: Template
metadata:
name: rhsm-frontend
objects:
- apiVersion: cloud.redhat.com/v1alpha1
kind: Frontend
metadata:
# this must match appList value in frontend-configs/deploy/deploy.yaml
name: subscriptions
spec:
envName: ${ENV_NAME}
title: rhsm
deploymentRepo: https://github.com/RedHatInsights/curiosity-frontend
API:
versions:
- v1
frontend:
paths:
- /apps/subscriptions
image: ${IMAGE}:${IMAGE_TAG}
navItems:
# use *-navigation.json in cloud-services-config for reference
- title: "Subscriptions"
expandable: true
routes:
- appId: "subscriptions"
title: "All RHEL"
href: "/insights/subscriptions/rhel"
product: "Subscription Watch"
- appId: "subscriptions"
title: "ARM"
href: "/insights/subscriptions/rhel-arm"
product: "Subscription Watch"
- appId: "subscriptions"
title: "IBM Power"
href: "/insights/subscriptions/rhel-ibmpower"
product: "Subscription Watch"
- appId: "subscriptions"
title: "IBM Z systems"
href: "/insights/subscriptions/rhel-ibmz"
product: "Subscription Watch"
- appId: "subscriptions"
title: "X86"
href: "/insights/subscriptions/rhel-x86"
product: "Subscription Watch"
- appId: "subscriptions"
title: "OpenShift Subscriptions"
href: "/openshift/subscriptions/openshift-container"
product: "Subscription Watch"
- appId: "subscriptions"
title: "Dedicated (On-Demand)"
href: "/openshift/subscriptions/openshift-dedicated"
product: "Subscription Watch"
- appId: "subscriptions"
title: "Streams for Apache Kafka"
href: "/application-services/subscriptions/streams"
product: "Subscription Watch"
module:
# this should match chrome/fed-modules.json in cloud-services-config
manifestLocation: "/apps/subscriptions/fed-mods.json"
modules:
- id: "application-services-subscriptions"
module: "./RootApp"
routes:
- pathname: "/application-services/subscriptions"
- id: "insights-subscriptions"
module: "./RootApp"
routes:
- pathname: "/insights/subscriptions"
- id: "openshift-subscriptions"
module: "./RootApp"
routes:
- pathname: "/openshift/subscriptions"

parameters:
- name: ENV_NAME
required: true
- name: IMAGE_TAG
required: true
- name: IMAGE
value: quay.io/cloudservices/rhsm-frontend
36 changes: 36 additions & 0 deletions deploy/pr_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# --------------------------------------------
# Export vars for helper scripts to use
# --------------------------------------------
# name of app-sre "application" folder this component lives in; needs to match for quay
export COMPONENT="rhsm"
# IMAGE should match the quay repo set by app.yaml in app-interface
export IMAGE="quay.io/cloudservices/curiosity-frontend"
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace
export APP_ROOT=$(pwd)
export NODE_BUILD_VERSION=`node -e 'console.log(require("./package.json").engines.node.match(/(\d+)\.\d+\.\d+/)[1])'`
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master

# --------------------------------------------
# Options that must be configured by app owner
# --------------------------------------------
IQE_PLUGINS="curiosity"
IQE_MARKER_EXPRESSION="smoke"
IQE_FILTER_EXPRESSION=""

set -exv
# source is preferred to | bash -s in this case to avoid a subshell
source <(curl -sSL $COMMON_BUILDER/src/frontend-build.sh)
BUILD_RESULTS=$?

# Stubbed out for now
mkdir -p $WORKSPACE/artifacts
cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml
<testsuite tests="1">
<testcase classname="dummy" name="dummytest"/>
</testsuite>
EOF

# teardown_docker
exit $BUILD_RESULTS
Loading