-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'qa-stable' into prod-stable
- Loading branch information
Showing
399 changed files
with
10,644 additions
and
7,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"parser": "typescript", | ||
"semi": true, | ||
"singleQuote": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.