Skip to content

Commit

Permalink
Merge branch 'qa-stable' into prod-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoodfred committed Mar 17, 2021
2 parents c6407b4 + 8505e65 commit 9a8dedf
Show file tree
Hide file tree
Showing 399 changed files with 10,644 additions and 7,156 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tag Release
on:
push:
branches:
- prod-stable
jobs:
tag_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: prod-stable
- run: |
git fetch --prune --unshallow
- name: Tag this release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DATE=$(date +"%Y.%m.%d")
PREV_RELEASE=$(git tag --list | tail -1)
MINOR_VERSION=0
case $PREV_RELEASE in
*"$DATE"*)
MINOR_VERSION="$PREV_RELEASE" | cut -d'.' -f5
MINOR_VERSION=$((MINOR_VERSION+1))
;;
*)
MINOR_VERSION=0
;;
esac
TAG="r.$DATE.$MINOR_VERSION"
git config --local user.email "cost-mgmt@redhat.com"
git config --local user.name "Cost Management Release Action"
git log $(git tag --list | tail -1)..prod-stable | git tag -a $TAG -F -
git push origin $TAG
shell: bash
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"arrowParens": "avoid",
"parser": "typescript",
"semi": true,
"singleQuote": true,
Expand Down
3 changes: 1 addition & 2 deletions archive/pages/details/components/nav/tertiaryNav.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Nav, NavItem, NavList } from '@patternfly/react-core';
import React from 'react';
import { WithTranslation, withTranslation } from 'react-i18next';
import { RouteComponentProps } from 'react-router';
import { withRouter } from 'react-router-dom';
import { RouteComponentProps, withRouter } from 'react-router-dom';

// eslint-disable-next-line no-shadow
export const enum TertiaryNavItem {
Expand Down
2 changes: 1 addition & 1 deletion archive/pages/details/ocpCloudDetails/ocpCloudDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ExportModal } from 'pages/details/components/export/exportModal';
import React from 'react';
import { InjectedTranslateProps, translate } from 'react-i18next';
import { connect } from 'react-redux';
import { RouteComponentProps } from 'react-router';
import { RouteComponentProps } from 'react-router-dom';
import { createMapStateToProps, FetchStatus } from 'store/common';
import { ocpProvidersQuery, providersSelectors } from 'store/providers';
import { reportActions, reportSelectors } from 'store/reports';
Expand Down
7 changes: 7 additions & 0 deletions config/chrome-render-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function chromeRenderLoader(source) {
const loaderUtils = require('loader-utils');
const options = loaderUtils.getOptions(this);
return `document.getElementById('root').classList.add('${options.appName}');var isChrome2 = window.insights && window.insights.chrome && window.insights.chrome.isChrome2 || false; if(!isChrome2){${source}}`;
}

module.exports = chromeRenderLoader;
55 changes: 55 additions & 0 deletions config/chunk-mapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* global */

/**
* The chunk mapper is required for other apps which do not run cost webpack init to propery register its modules
* If we want to used the remote module outside of cost and before it was run in browser, the fed-mods.json is required
* to properly find and register new remote modules.
*/
class ChunkMapper {
constructor(options) {
this.config = {};
this.options = options || {};
}

apply(compiler) {
compiler.hooks.emit.tap('ChunkMapper', compilation => {
const prefix =
this.options.prefix || RegExp('^/.*/$').test(compiler.options.output.publicPath)
? compiler.options.output.publicPath
: '/';
compilation.chunks.forEach(({ name, files, runtime }) => {
const modules = Array.isArray(this.options.modules) ? this.options.modules : [this.options.modules];
if (modules.find(oneEntry => RegExp(`${oneEntry}$`).test(runtime))) {
this.config[runtime] = {
...(this.config[runtime] || {}),
...(name === runtime
? {
entry: Array.from(files)
.map(item => `${prefix}${item}`)
.filter((file, _index, array) => {
if (array.find(item => !RegExp('\\.hot-update\\.js$').test(item))) {
return !RegExp('\\.hot-update\\.js$').test(file);
}

return true;
}),
}
: {
modules: [
...(this.config[runtime].modules || []),
...Array.from(files).map(item => `${prefix}${item}`),
],
}),
};
}
});

compilation.assets['fed-mods.json'] = {
source: () => JSON.stringify(this.config, null, 4),
size: () => JSON.stringify(this.config, null, 4).length,
};
});
}
}

module.exports = ChunkMapper;
Loading

0 comments on commit 9a8dedf

Please sign in to comment.