Commit c648bdcc authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/testEnvBuild' into 'master'

Fix/test env build

See merge request !72
parents 223a50ce 9355a4b0
...@@ -2,10 +2,10 @@ import apolloSsr from '../../../config/apollo.ssr.json'; ...@@ -2,10 +2,10 @@ import apolloSsr from '../../../config/apollo.ssr.json';
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https:'; const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https:';
const hostMap = { const hostMap = {
apiHost: `${protocol}//quantum-blocks-tob.liangkebang.net`, apiHost: `${protocol}//quantum-blocks-test1.liangkebang.net`,
kdspHost: `${protocol}//talos-tob.liangkebang.net`, kdspHost: `${protocol}//talos-test1.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
mallHost: `${protocol}//mall-tob.liangkebang.net`, mallHost: `${protocol}//mall-test1.liangkebang.net`,
test: true, test: true,
yxmTenantId: 560761, yxmTenantId: 560761,
appIdMap: { appIdMap: {
......
...@@ -3,4 +3,4 @@ import dev from './dev.config'; ...@@ -3,4 +3,4 @@ import dev from './dev.config';
import test from './test.config'; import test from './test.config';
// export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev; // export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
export default process.env.SENTRY_ENV ? test : process.env.NODE_ENV === 'production' ? prod : dev; export default process.env.COS_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
...@@ -16,6 +16,7 @@ npm.load(() => { ...@@ -16,6 +16,7 @@ npm.load(() => {
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
npm.run("start"); npm.run("start");
} else { } else {
npm.run("ii");
npm.run("test"); npm.run("test");
} }
}); });
......
{ {
"api": { "api": {
"apiHost": "https://quantum-blocks-vcc2.liangkebang.net", "apiHost": "https://quantum-blocks-undefined.liangkebang.net",
"h5Host": "https://quantum-h5-vcc2.liangkebang.net", "h5Host": "https://quantum-h5-undefined.liangkebang.net",
"opapiHost": "https://opapi-vcc2.liangkebang.net", "opapiHost": "https://opapi-undefined.liangkebang.net",
"passportHost": "https://passportapi-vcc2.liangkebang.net", "passportHost": "https://passportapi-undefined.liangkebang.net",
"kdspHost": "https://talos-vcc2.liangkebang.net", "kdspHost": "https://talos-undefined.liangkebang.net",
"loginUrl": "", "loginUrl": "",
"h5ShopHost": "https://tenet-vcc2.liangkebang.net/#", "h5ShopHost": "https://tenet-undefined.liangkebang.net/#",
"mallHost": "https://mall-undefined.liangkebang.net",
"yxmTenantId": 560761, "yxmTenantId": 560761,
"appIdMap": { "appIdMap": {
"560761": "wxe16bf9293671506c", "560761": "wxe16bf9293671506c",
"560867": "wxccb8435d68e8c7d6" "560867": "wxccb8435d68e8c7d6"
} }
}, },
"mysql": {
"low_code": {
"host": "172.17.5.24",
"port": "30487",
"username": "qa",
"password": "qatest",
"database": "low_code"
}
},
"redis": { "redis": {
"host": "172.17.5.13", "port": "undefined",
"port": "31565", "host": "undefined",
"password": "", "password": "",
"db": 0 "db": 0
}, },
......
{ {"apiHost":"https://quantum-blocks-undefined.liangkebang.net","h5Host":"https://quantum-h5-undefined.liangkebang.net","opapiHost":"https://opapi-undefined.liangkebang.net","passportHost":"https://passportapi-undefined.liangkebang.net","kdspHost":"https://talos-undefined.liangkebang.net","loginUrl":"","h5ShopHost":"https://tenet-undefined.liangkebang.net/#","mallHost":"https://mall-undefined.liangkebang.net","yxmTenantId":560761,"appIdMap":{"560761":"wxe16bf9293671506c","560867":"wxccb8435d68e8c7d6"},"qiniuUpHost":"https://up-z0.qiniup.com","qiniuHost":"https://appsync.lkbang.net"}
"apiHost": "https://quantum-blocks-vcc2.liangkebang.net", \ No newline at end of file
"h5Host": "https://quantum-h5-vcc2.liangkebang.net",
"opapiHost": "https://opapi-vcc2.liangkebang.net",
"passportHost": "https://passportapi-vcc2.liangkebang.net",
"kdspHost": "https://talos-vcc2.liangkebang.net",
"loginUrl": "",
"h5ShopHost": "https://tenet-vcc2.liangkebang.net/#",
"yxmTenantId": 560761,
"appIdMap": {
"560761": "wxe16bf9293671506c",
"560867": "wxccb8435d68e8c7d6"
}
}
\ No newline at end of file
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
"scripts": { "scripts": {
"start": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050", "start": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050",
"start:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE egg-scripts start --port 9050", "start:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE egg-scripts start --port 9050",
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2 egg-scripts start --port 80 --workers 1", "test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop", "stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4", "backend": "nohup egg-scripts start --port 7001 --workers 4",
"dev": "egg-bin dev -r egg-ts-helper/register", "dev": "egg-bin dev -r egg-ts-helper/register",
"debug": "egg-bin debug -r egg-ts-helper/register", "debug": "egg-bin debug -r egg-ts-helper/register",
"apollo": "node bin/apollo.js", "apollo": "node bin/apollo.js",
"build": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool", "build": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool",
"build:test": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s npm run apollo && cross-env COS_ENV=test easy build --devtool",
"build:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && cross-env COS_ENV=production easy build --devtool", "build:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && cross-env COS_ENV=production easy build --devtool",
"build:test": "cross-env COS_ENV=test easy build --devtool",
"tsc": "ets && tsc -p tsconfig.json", "tsc": "ets && tsc -p tsconfig.json",
"clean": "ets clean", "clean": "ets clean",
"kill": "easy kill", "kill": "easy kill",
"lint": "tslint --project . -c tslint.json", "lint": "tslint --project . -c tslint.json",
"fix": "tslint --fix --project . -c tslint.json 'app/web/**/*{.ts}'", "fix": "tslint --fix --project . -c tslint.json 'app/web/**/*{.ts}'",
"ii": "npm install --registry https://registry.npm.taobao.org", "ii": "rm -rf node_modules && npm install --registry http://npmprivate.quantgroups.com",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
}, },
"dependencies": { "dependencies": {
......
...@@ -60,7 +60,8 @@ module.exports = { ...@@ -60,7 +60,8 @@ module.exports = {
{ {
define:{ define:{
'process.env': { 'process.env': {
SENTRY_ENV: JSON.stringify(process.env.SENTRY_ENV) SENTRY_ENV: JSON.stringify(process.env.SENTRY_ENV),
COS_ENV: JSON.stringify(process.env.COS_ENV),
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment