Selaa lähdekoodia

Jenkinsfile 配置

chenkq 3 viikkoa sitten
vanhempi
sitoutus
4b71a7d479
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      Jenkinsfile

+ 4 - 2
Jenkinsfile

@@ -208,7 +208,8 @@ pipeline {
             }
             agent {
                 docker {
-                    image 'maven:3-amazoncorretto-11'
+                    // storlead-trade/sales 等模块 target 为 17,需 JDK 17 编译
+                    image 'maven:3-amazoncorretto-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
@@ -231,7 +232,8 @@ pipeline {
                 script {
                     docker.withRegistry(DOCKER_LOGIN_REGISTRY, DOCKER_REGISTRY) {
 
-                        BASE_IMAGE = 'registry.cn-shenzhen.aliyuncs.com/storlead/openjdk:11'
+                        // 与模块 target 17 一致;若私服无此 tag,需先推送或改用 amazoncorretto:17
+                        BASE_IMAGE = 'registry.cn-shenzhen.aliyuncs.com/storlead/openjdk:17'
                         sh "docker pull ${BASE_IMAGE}"
 
                         sh """