From 821ef1b8495e13f54eb664a672cb27b3da2f2d77 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 30 Dec 2022 16:43:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95secrets=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 6 ++++++ .env.production | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a7144c8..870c453 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,6 +34,9 @@ steps: # node install - name: node-package image: niushuai233/node-cnpm:16.17.1 + environment: + PROD_API_URL: + from_secret: PROD_API_URL volumes: - name: node-cache path: /node_cache @@ -42,6 +45,9 @@ steps: commands: - echo 'node package start' - ls -alh + - echo $PROD_API_URL + - sed -i "s#PROD_API_URL#$PROD_API_URL#g" .env.production + - cat .env.production # 打包 - npm config set registry https://registry.npm.taobao.org - npm config set cache /node_cache --global diff --git a/.env.production b/.env.production index 1c0cad8..5bda957 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=http://localhost:8080/prodApi +VUE_APP_API_BASE_URL=PROD_API_URL VUE_APP_CAS_BASE_URL=http:///cas VUE_APP_ONLINE_BASE_URL=http:///onlinePreview \ No newline at end of file