Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

root only file system fix #89

Merged
merged 10 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
QA changes
  • Loading branch information
Gunasekar-K committed Feb 15, 2023
commit c153506247bc74a3bd07deca57fc5c3b06bc71db
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
APPNAME: "mfe-core"
steps: *builddeploy_steps

"build-qa":
<<: *defaults
environment:
DEPLOY_ENV: "QA"
LOGICAL_ENV: "qa"
APPNAME: "mfe-core"
steps: *builddeploy_steps

"build-prod":
<<: *defaults
environment:
Expand All @@ -77,6 +85,13 @@ workflows:
- dev
- feat/onboarding-app

- "build-qa":
context: org-global
filters:
branches:
only:
- qa

# Production builds are exectuted only on tagged commits to the
# master branch.
- "build-prod":
Expand Down
7 changes: 7 additions & 0 deletions config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ module.exports = Object.freeze({
'mfeIndexPath': '/index.html',
'mfeRoutesPath': '/config/micro-frontends-routes-dev.txt'
},
{
'appEnv': 'qa',
'mfeConfigPath': '/config/micro-frontends-config-qa.json',
'mfeIndexPath': '/index.html',
'mfeRoutesPath': '/config/micro-frontends-routes-qa.txt'
},
{
'appEnv': 'prod',
'mfeConfigPath': '/config/micro-frontends-config-prod.json',
Expand All @@ -26,6 +32,7 @@ module.exports = Object.freeze({
}
],
APP_ENV_DEV: "dev",
APP_ENV_QA: "qa",
APP_ENV_PROD: "prod",
APP_ENV_LOCAL_MULTI: "local-multi",
APP_ENV_LOCAL: "local",
Expand Down
18 changes: 18 additions & 0 deletions config/micro-frontends-config-qa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"imports": {
"@topcoder/mfe-header": "https://platform.topcoder-qa.com/navbar/topcoder-mfe-header.js",
"@topcoder/micro-frontends-react-app": "https://platform.topcoder-qa.com/react/topcoder-micro-frontends-react-app.js",
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder-qa.com/angular/main.js",
"@topcoder/micro-frontends-teams": "https://platform.topcoder-qa.com/taas-app/topcoder-micro-frontends-teams.js",
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder-qa.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder-qa.com/earn-app/topcoder-micro-frontends-earn-app.js",
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder-qa.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
"@topcoder/micro-frontends-model-app": "https://platform.topcoder-qa.com/model-app/topcoder-micro-frontends-model-app.js",
"@topcoder/micro-frontends-community-admin-app": "https://tc-micro-community-admin.herokuapp.com/community-admin-app/topcoder-micro-frontends-community-admin-app.js",
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder-qa.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder-qa.com/profile-app/topcoder-micro-frontends-profile-app.js",
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder-qa.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
"@topcoder/micro-frontends-forums-app": "https://platform.topcoder-qa.com/forums-app/topcoder-micro-frontends-forums-app.js",
"@topcoder/mfe-customer-work": "https://platform.topcoder-qa.com/self-service-app/topcoder-mfe-customer-work.js"
}
}
58 changes: 58 additions & 0 deletions config/micro-frontends-routes-qa.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<route path="micro-frontends-react-route">
<application name="@topcoder/micro-frontends-react-app"></application>
</route>
<route path="micro-frontends-angular-route">
<application name="@topcoder/micro-frontends-angular-app"></application>
</route>
<route path="taas">
<application name="@topcoder/micro-frontends-teams"></application>
</route>
<route path="task-marketplace">
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
</route>
<route path="earn">
<application name="@topcoder/micro-frontends-earn-app"></application>
</route>
<route path="submissionreview">
<application name="@topcoder/micro-frontends-submission-review-app"></application>
</route>
<route path="model">
<application name="@topcoder/micro-frontends-model-app"></application>
</route>
<route path="community-admin">
<application name="@topcoder/micro-frontends-community-admin-app"></application>
</route>
<route path="taas-admin">
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
</route>
<route path="profile">
<application name="@topcoder/micro-frontends-profile-app"></application>
</route>
<route path="onboard">
<application name="@topcoder/micro-frontends-onboarding-app"></application>
</route>
<route path="forums">
<application name="@topcoder/micro-frontends-forums-app"></application>
</route>
<route path="self-service">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="work">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="account">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="support">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="unauthorized">
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
You are unauthorized
</div>
</route>
<route default>
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
</div>
</route>
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ app.get("/micro-frontends-config", async function (req, res) {
switch (process.env.APPENV.toLowerCase()) {
case APP_CONST.APP_ENV_PROD.toLowerCase() :
case APP_CONST.APP_ENV_DEV.toLowerCase() :
case APP_CONST.APP_ENV_QA.toLowerCase() :
mfeRoutes = await axios.get(env_config.mfeConfigPath)
mfeRoutes = mfeRoutes.data
break;
Expand All @@ -43,6 +44,7 @@ app.get("*", async function (req, res) {
switch (process.env.APPENV.toLowerCase()) {
case APP_CONST.APP_ENV_PROD.toLowerCase() :
case APP_CONST.APP_ENV_DEV.toLowerCase() :
case APP_CONST.APP_ENV_QA.toLowerCase() :
case APP_CONST.APP_ENV_LOCAL.toLowerCase() :
mfeIndex = await fsPromises.readFile(path.join(distPath + env_config.mfeIndexPath))
break;
Expand All @@ -56,6 +58,7 @@ app.get("*", async function (req, res) {
let mfeRoutes
switch (process.env.APPENV.toLowerCase()) {
case APP_CONST.APP_ENV_DEV.toLowerCase() :
case APP_CONST.APP_ENV_QA.toLowerCase() :
case APP_CONST.APP_ENV_PROD.toLowerCase() :
mfeRoutes = await axios.get(env_config.mfeRoutesPath)
mfeRoutes = mfeRoutes.data
Expand Down