Browse Source

Jenkinsfile 配置

chenkq 3 weeks ago
parent
commit
e4963814fe
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Jenkinsfile

+ 5 - 5
Jenkinsfile

@@ -208,8 +208,8 @@ pipeline {
             }
             agent {
                 docker {
-                    // storlead-trade/sales 等模块 target 为 17,需 JDK 17 编译
-                    image 'maven:3-amazoncorretto-17'
+                    // 与 Temurin 17 一致(含 Maven);若本地无此镜像会自动拉取
+                    image 'maven:3-eclipse-temurin-17'
                     //让docker 使用 host 宿主机的 m2仓库 使用root用户来运行 以让指定的~/.m2/config/setting.xml 阿里加速下载maven 依赖生效
                     args '-v /app:/app:z -v $HOME/.m2:/root/.m2:z -u root'
                     reuseNode true
@@ -232,9 +232,9 @@ pipeline {
                 script {
                     docker.withRegistry(DOCKER_LOGIN_REGISTRY, DOCKER_REGISTRY) {
 
-                        // 与模块 target 17 一致;若私服无此 tag,需先推送或改用 amazoncorretto:17
-                        BASE_IMAGE = 'registry.cn-shenzhen.aliyuncs.com/storlead/openjdk:17'
-                        sh "docker pull ${BASE_IMAGE}"
+                        // 使用 Jenkins 节点已有的 eclipse-temurin:17
+                        BASE_IMAGE = 'eclipse-temurin:17'
+                        sh "docker pull ${BASE_IMAGE} || true"
 
                         sh """
                           echo '