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

Commit c153506

Browse files
committed
QA changes
1 parent 7cada80 commit c153506

File tree

5 files changed

+101
-0
lines changed

5 files changed

+101
-0
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ jobs:
5656
APPNAME: "mfe-core"
5757
steps: *builddeploy_steps
5858

59+
"build-qa":
60+
<<: *defaults
61+
environment:
62+
DEPLOY_ENV: "QA"
63+
LOGICAL_ENV: "qa"
64+
APPNAME: "mfe-core"
65+
steps: *builddeploy_steps
66+
5967
"build-prod":
6068
<<: *defaults
6169
environment:
@@ -77,6 +85,13 @@ workflows:
7785
- dev
7886
- feat/onboarding-app
7987

88+
- "build-qa":
89+
context: org-global
90+
filters:
91+
branches:
92+
only:
93+
- qa
94+
8095
# Production builds are exectuted only on tagged commits to the
8196
# master branch.
8297
- "build-prod":

config/constants.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ module.exports = Object.freeze({
66
'mfeIndexPath': '/index.html',
77
'mfeRoutesPath': '/config/micro-frontends-routes-dev.txt'
88
},
9+
{
10+
'appEnv': 'qa',
11+
'mfeConfigPath': '/config/micro-frontends-config-qa.json',
12+
'mfeIndexPath': '/index.html',
13+
'mfeRoutesPath': '/config/micro-frontends-routes-qa.txt'
14+
},
915
{
1016
'appEnv': 'prod',
1117
'mfeConfigPath': '/config/micro-frontends-config-prod.json',
@@ -26,6 +32,7 @@ module.exports = Object.freeze({
2632
}
2733
],
2834
APP_ENV_DEV: "dev",
35+
APP_ENV_QA: "qa",
2936
APP_ENV_PROD: "prod",
3037
APP_ENV_LOCAL_MULTI: "local-multi",
3138
APP_ENV_LOCAL: "local",

config/micro-frontends-config-qa.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"imports": {
3+
"@topcoder/mfe-header": "https://platform.topcoder-qa.com/navbar/topcoder-mfe-header.js",
4+
"@topcoder/micro-frontends-react-app": "https://platform.topcoder-qa.com/react/topcoder-micro-frontends-react-app.js",
5+
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder-qa.com/angular/main.js",
6+
"@topcoder/micro-frontends-teams": "https://platform.topcoder-qa.com/taas-app/topcoder-micro-frontends-teams.js",
7+
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder-qa.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
8+
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder-qa.com/earn-app/topcoder-micro-frontends-earn-app.js",
9+
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder-qa.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
10+
"@topcoder/micro-frontends-model-app": "https://platform.topcoder-qa.com/model-app/topcoder-micro-frontends-model-app.js",
11+
"@topcoder/micro-frontends-community-admin-app": "https://tc-micro-community-admin.herokuapp.com/community-admin-app/topcoder-micro-frontends-community-admin-app.js",
12+
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder-qa.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
13+
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder-qa.com/profile-app/topcoder-micro-frontends-profile-app.js",
14+
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder-qa.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
15+
"@topcoder/micro-frontends-forums-app": "https://platform.topcoder-qa.com/forums-app/topcoder-micro-frontends-forums-app.js",
16+
"@topcoder/mfe-customer-work": "https://platform.topcoder-qa.com/self-service-app/topcoder-mfe-customer-work.js"
17+
}
18+
}

config/micro-frontends-routes-qa.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<route path="micro-frontends-react-route">
2+
<application name="@topcoder/micro-frontends-react-app"></application>
3+
</route>
4+
<route path="micro-frontends-angular-route">
5+
<application name="@topcoder/micro-frontends-angular-app"></application>
6+
</route>
7+
<route path="taas">
8+
<application name="@topcoder/micro-frontends-teams"></application>
9+
</route>
10+
<route path="task-marketplace">
11+
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
12+
</route>
13+
<route path="earn">
14+
<application name="@topcoder/micro-frontends-earn-app"></application>
15+
</route>
16+
<route path="submissionreview">
17+
<application name="@topcoder/micro-frontends-submission-review-app"></application>
18+
</route>
19+
<route path="model">
20+
<application name="@topcoder/micro-frontends-model-app"></application>
21+
</route>
22+
<route path="community-admin">
23+
<application name="@topcoder/micro-frontends-community-admin-app"></application>
24+
</route>
25+
<route path="taas-admin">
26+
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
27+
</route>
28+
<route path="profile">
29+
<application name="@topcoder/micro-frontends-profile-app"></application>
30+
</route>
31+
<route path="onboard">
32+
<application name="@topcoder/micro-frontends-onboarding-app"></application>
33+
</route>
34+
<route path="forums">
35+
<application name="@topcoder/micro-frontends-forums-app"></application>
36+
</route>
37+
<route path="self-service">
38+
<application name="@topcoder/mfe-customer-work"></application>
39+
</route>
40+
<route path="work">
41+
<application name="@topcoder/mfe-customer-work"></application>
42+
</route>
43+
<route path="account">
44+
<application name="@topcoder/mfe-customer-work"></application>
45+
</route>
46+
<route path="support">
47+
<application name="@topcoder/mfe-customer-work"></application>
48+
</route>
49+
<route path="unauthorized">
50+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
51+
You are unauthorized
52+
</div>
53+
</route>
54+
<route default>
55+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
56+
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
57+
</div>
58+
</route>

server.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ app.get("/micro-frontends-config", async function (req, res) {
2121
switch (process.env.APPENV.toLowerCase()) {
2222
case APP_CONST.APP_ENV_PROD.toLowerCase() :
2323
case APP_CONST.APP_ENV_DEV.toLowerCase() :
24+
case APP_CONST.APP_ENV_QA.toLowerCase() :
2425
mfeRoutes = await axios.get(env_config.mfeConfigPath)
2526
mfeRoutes = mfeRoutes.data
2627
break;
@@ -43,6 +44,7 @@ app.get("*", async function (req, res) {
4344
switch (process.env.APPENV.toLowerCase()) {
4445
case APP_CONST.APP_ENV_PROD.toLowerCase() :
4546
case APP_CONST.APP_ENV_DEV.toLowerCase() :
47+
case APP_CONST.APP_ENV_QA.toLowerCase() :
4648
case APP_CONST.APP_ENV_LOCAL.toLowerCase() :
4749
mfeIndex = await fsPromises.readFile(path.join(distPath + env_config.mfeIndexPath))
4850
break;
@@ -56,6 +58,7 @@ app.get("*", async function (req, res) {
5658
let mfeRoutes
5759
switch (process.env.APPENV.toLowerCase()) {
5860
case APP_CONST.APP_ENV_DEV.toLowerCase() :
61+
case APP_CONST.APP_ENV_QA.toLowerCase() :
5962
case APP_CONST.APP_ENV_PROD.toLowerCase() :
6063
mfeRoutes = await axios.get(env_config.mfeRoutesPath)
6164
mfeRoutes = mfeRoutes.data

0 commit comments

Comments
 (0)