提交jenkins自动化流水线

This commit is contained in:
Home
2026-03-28 21:25:06 +08:00
parent b075b68dbf
commit 667b7261c3
Vendored
+13 -1
View File
@@ -22,9 +22,21 @@ pipeline {
'''
}
}
// 修复 npm 权限 + 设置国内镜像
stage('修复npm权限') {
steps {
sh '''
# 配置 npm 缓存目录到当前工作区(解决权限问题)
npm config set cache $WORKSPACE/.npm
npm config set prefix $WORKSPACE/.npm-global
npm config set registry https://registry.npmmirror.com
'''
}
}
stage('安装依赖') {
steps {
sh 'npm install --registry=https://registry.npmmirror.com'
sh 'npm install'
}
}
stage('打包uniapp') {