Преглед изворни кода

修改生产测试部署配置

lijie пре 4 година
родитељ
комит
c5b20b3c16
2 измењених фајлова са 42 додато и 12 уклоњено
  1. 2 12
      .drone.yml
  2. 40 0
      .drone_prod.yml

+ 2 - 12
.drone.yml

@@ -8,7 +8,7 @@ steps:
       - npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
       - npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
       - npm i
-      - npm run build:prod
+      - npm run build:stage
       - pwd
       - ls -la
   - name: scp_files
@@ -31,20 +31,10 @@ steps:
       script:
         - export PATH=/usr/local/bin:$PATH
         - echo $PATH
-  - name: scp_files_to_test
-    image: appleboy/drone-scp
-    settings:
-      host: 182.92.65.152
-      username: root
-      password: Swsc2021!bd
-      debug: true
-      target: /www/wwwroot/gdsc.svstrong.com/release
-      source: dist
-      rm: true
 volumes:
   - name: cache # The name use in this pipeline,
     host:
       path: /tmp/cache # The path be used in the host.
   - name: dockersock
     host:
-      path: /var/run/docker.sock
+      path: /var/run/docker.sock

+ 40 - 0
.drone_prod.yml

@@ -0,0 +1,40 @@
+kind: pipeline
+name: default
+steps:
+  - name: build
+    image: node:14
+    commands:
+      - npm config set registry http://registry.npm.taobao.org
+      - npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
+      - npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
+      - npm i
+      - npm run build:prod
+      - pwd
+      - ls -la
+  - name: scp_files
+    image: appleboy/drone-scp
+    settings:
+      host: 182.92.65.152
+      username: root
+      password: Swsc2021!bd
+      debug: true
+      target: /www/wwwroot/gdsc.svstrong.com/release
+      source: dist
+      rm: true
+  - name: deploy
+    image:  appleboy/drone-ssh
+    settings:
+      host: 182.92.65.152
+      username: root
+      password: Swsc2021!bd
+      debug: true
+      script:
+        - export PATH=/usr/local/bin:$PATH
+        - echo $PATH
+volumes:
+  - name: cache # The name use in this pipeline,
+    host:
+      path: /tmp/cache # The path be used in the host.
+  - name: dockersock
+    host:
+      path: /var/run/docker.sock