perf: 启用 Docker BuildKit 和 Maven 缓存优化构建速度
- 启用 Docker BuildKit 缓存挂载 - 使用 --mount=type=cache 缓存 Maven 依赖 - 优化 Dockerfile 层缓存策略 - 添加构建优化指南文档 预期效果: - 首次构建: ~30分钟 - 后续构建(无变更): ~2分钟 - 后续构建(有变更): ~5-8分钟
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -22,6 +22,10 @@ pipeline {
|
||||
// Docker Registry 配置
|
||||
REGISTRY = 'localhost:5000'
|
||||
|
||||
// 启用 Docker BuildKit(加速构建)
|
||||
DOCKER_BUILDKIT = '1'
|
||||
BUILDKIT_PROGRESS = 'plain'
|
||||
|
||||
// Maven 配置
|
||||
MAVEN_OPTS = '-Xmx2048m -Dmaven.repo.local=.m2/repository'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user