From d371093c4239634adfa6b5de69ad564af598003f Mon Sep 17 00:00:00 2001 From: panjunjie <46790855@qq.com> Date: Sun, 10 Aug 2025 20:48:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Jenkinsfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 依赖脚本 --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fb01195..a8f1a53 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,12 @@ pipeline { stage('安装依赖') { steps { - sh 'npm install' + ssh ''' + # 清理缓存和旧依赖 + rm -rf node_modules package-lock.json + # 重新安装依赖 + npm install --registry=https://registry.npmmirror.com # 使用国内源加速 + ''' } }