Selaa lähdekoodia

为阿里云测试环境构建

Michael Wang 5 vuotta sitten
vanhempi
commit
9b1496bc0f
6 muutettua tiedostoa jossa 33 lisäystä ja 2 poistoa
  1. 1 1
      .env.development
  2. 1 1
      .env.staging
  3. 5 0
      .env.stagingAli
  4. 18 0
      jenkins-stagingAli.sh
  5. 3 0
      package.json
  6. 5 0
      prebuild.js

+ 1 - 1
.env.development

@@ -4,4 +4,4 @@ VUE_APP_WK_SERVER_SOCKET=wss://wuhan-dev.qmth.com.cn:8878/api/ws/faceBiopsy
 VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://wuhan-dev.qmth.com.cn:8878/api/ws/fileAnswer
 VUE_APP_CORE_HOST_URL=https://192.168.10.38:8878
 VUE_APP_OE_ADMIN_HOST_URL=https://192.168.10.38:8878
-VUE_APP_OE_STUDENT_HOST_URL=https://192.168.10.38:887
+VUE_APP_OE_STUDENT_HOST_URL=https://192.168.10.38:8878

+ 1 - 1
.env.staging

@@ -4,4 +4,4 @@ VUE_APP_WK_SERVER_SOCKET=wss://wuhan-test.qmth.com.cn:8878/api/ws/faceBiopsy
 VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://wuhan-test.qmth.com.cn:8878/api/ws/fileAnswer
 VUE_APP_CORE_HOST_URL=https://192.168.10.38:8878
 VUE_APP_OE_ADMIN_HOST_URL=https://192.168.10.38:8878
-VUE_APP_OE_STUDENT_HOST_URL=https://192.168.10.38:88
+VUE_APP_OE_STUDENT_HOST_URL=https://192.168.10.38:8878

+ 5 - 0
.env.stagingAli

@@ -0,0 +1,5 @@
+VUE_APP_TK_SERVER_HTML_URL=http://ecs-test.qmth.com.cn
+VUE_APP_TK_SERVER_API_URL=http://ecs-test.qmth.com.cn
+VUE_APP_WK_SERVER_SOCKET=wss://ecs-test.qmth.com.cn:8878/api/ws/faceBiopsy
+VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs-test.qmth.com.cn:8878/api/ws/fileAnswer
+VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED

+ 18 - 0
jenkins-stagingAli.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+pwd
+
+yarn
+npm run build:stagingAli
+
+rm -rf ~/project/examcloud/static/student-client/dist/*
+mkdir -p ~/project/examcloud/static/student-client
+cp -r  dist ~/project/examcloud/static/student-client/
+
+rm -rf ~/packages/static/student-client/*
+mkdir -p ~/packages/static/student-client
+cp -r dist ~/packages/static/student-client/
+
+cd ~/packages/static/
+rm -rf student-client.tar.gz
+tar -zcvf student-client.tar.gz student-client/
+

+ 3 - 0
package.json

@@ -14,6 +14,9 @@
     "prebuild:staging": "node prebuild",
     "build:staging": "NODE_ENV=production vue-cli-service build --mode staging",
     "postbuild:staging": "node postbuild",
+    "prebuild:stagingAli": "node prebuild",
+    "build:stagingAli": "NODE_ENV=production vue-cli-service build --mode stagingAli",
+    "postbuild:stagingAli": "node postbuild",
     "prebuild:prod": "node prebuild",
     "build:prod": "vue-cli-service build",
     "postbuild:prod": "IS_PROD=true node postbuild",

+ 5 - 0
prebuild.js

@@ -24,6 +24,11 @@ fs.writeFileSync(
   "\nVUE_APP_GIT_REPO_VERSION=开发环境-" + buildDate + " - " + revision
 );
 
+fs.writeFileSync(
+  ".env.stagingAli.local",
+  "VUE_APP_GIT_REPO_VERSION=测试环境(阿里云)-" + buildDate + " - " + revision
+);
+
 fs.writeFileSync(
   ".env.staging.local",
   "VUE_APP_GIT_REPO_VERSION=测试环境-" + buildDate + " - " + revision