Skip to content

QA changes #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install_dependency: &install_dependency
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.4.2 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
Expand Down Expand Up @@ -59,6 +59,14 @@ jobs:
APPNAME: "micro-frontends-forums-app"
steps: *builddeploy_steps

"build-qa":
<<: *defaults
environment:
DEPLOY_ENV: "QA"
LOGICAL_ENV: "qa"
APPNAME: "micro-frontends-forums-app"
steps: *builddeploy_steps

"build-prod":
<<: *defaults
environment:
Expand All @@ -79,6 +87,14 @@ workflows:
only:
- develop

# Development builds are executed on "develop" branch only.
- "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
14 changes: 11 additions & 3 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/* global process */

module.exports = (() => {
const appEnv = process.env.APPENV === "prod" ? "prod" : "dev";
return require(`./${appEnv}`);
})();
const env = process.env.APPENV || "dev";

console.log(`APPENV: "${env}"`);

// for security reason don't let to require any arbitrary file defined in process.env
if (["prod", "dev", "qa"].indexOf(env) < 0) {
return require("./dev");
}

return require("./" + env);
})();
7 changes: 7 additions & 0 deletions config/qa.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
API: {
V3: "https://api.topcoder-qa.com/v3",
V5: "https://api.topcoder-qa.com/v5",
},
VANILLA_EMBED_JS: "https://vanilla.topcoder-qa.com/js/embed.js",
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"start": "node server.js",
"dev": "cross-env APPMODE=development webpack-dev-server --port 8602 --host 0.0.0.0",
"dev-https": "cross-env APPMODE=development webpack-dev-server --https --port 8602 --host 0.0.0.0",
"qa": "cross-env APPMODE=development webpack-dev-server --port 8602 --host 0.0.0.0",
"build": "webpack --mode=${APPMODE:-production} --env.config=${APPENV:-prod}",
"analyze": "webpack --mode=production --env.analyze=true",
"lint": "eslint ./src --ext .js,.jsx",
Expand Down