Skip to content

Commit 7da95ac

Browse files
authored
Merge pull request #18 from topcoder-platform/qa
QA changes [skip ci]
2 parents 82f6432 + be0d812 commit 7da95ac

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

.circleci/config.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install_dependency: &install_dependency
1111
install_deploysuite: &install_deploysuite
1212
name: Installation of install_deploysuite.
1313
command: |
14-
git clone --branch v1.4.2 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
14+
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1515
cp ./../buildscript/master_deploy.sh .
1616
cp ./../buildscript/buildenv.sh .
1717
cp ./../buildscript/awsconfiguration.sh .
@@ -59,6 +59,14 @@ jobs:
5959
APPNAME: "micro-frontends-forums-app"
6060
steps: *builddeploy_steps
6161

62+
"build-qa":
63+
<<: *defaults
64+
environment:
65+
DEPLOY_ENV: "QA"
66+
LOGICAL_ENV: "qa"
67+
APPNAME: "micro-frontends-forums-app"
68+
steps: *builddeploy_steps
69+
6270
"build-prod":
6371
<<: *defaults
6472
environment:
@@ -79,6 +87,14 @@ workflows:
7987
only:
8088
- develop
8189

90+
# Development builds are executed on "develop" branch only.
91+
- "build-qa":
92+
context: org-global
93+
filters:
94+
branches:
95+
only:
96+
- qa
97+
8298
# Production builds are exectuted only on tagged commits to the
8399
# master branch.
84100
- "build-prod":

config/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
/* global process */
22

33
module.exports = (() => {
4-
const appEnv = process.env.APPENV === "prod" ? "prod" : "dev";
5-
return require(`./${appEnv}`);
6-
})();
4+
const env = process.env.APPENV || "dev";
5+
6+
console.log(`APPENV: "${env}"`);
7+
8+
// for security reason don't let to require any arbitrary file defined in process.env
9+
if (["prod", "dev", "qa"].indexOf(env) < 0) {
10+
return require("./dev");
11+
}
12+
13+
return require("./" + env);
14+
})();

config/qa.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
API: {
3+
V3: "https://api.topcoder-qa.com/v3",
4+
V5: "https://api.topcoder-qa.com/v5",
5+
},
6+
VANILLA_EMBED_JS: "https://vanilla.topcoder-qa.com/js/embed.js",
7+
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"start": "node server.js",
55
"dev": "cross-env APPMODE=development webpack-dev-server --port 8602 --host 0.0.0.0",
66
"dev-https": "cross-env APPMODE=development webpack-dev-server --https --port 8602 --host 0.0.0.0",
7+
"qa": "cross-env APPMODE=development webpack-dev-server --port 8602 --host 0.0.0.0",
78
"build": "webpack --mode=${APPMODE:-production} --env.config=${APPENV:-prod}",
89
"analyze": "webpack --mode=production --env.analyze=true",
910
"lint": "eslint ./src --ext .js,.jsx",

0 commit comments

Comments
 (0)