1811872455@163.com hai 2 semanas
pai
achega
48b4fab43d
Modificáronse 2 ficheiros con 8 adicións e 8 borrados
  1. 6 6
      Jenkinsfile
  2. 2 2
      storlead-centre-api/src/main/resources/application-test.yml

+ 6 - 6
Jenkinsfile

@@ -133,8 +133,8 @@ pipeline {
 
                         echo "处理MODULE_NAMESPACE_RESTFUL"
                         //把 module 名 从 sp-xxx 变成 xxx 也就是 项目 的 namespace
-                        if (API_NAMESPACE_RESTFUL == "sp-sales-api") {
-                            API_NAMESPACE_RESTFUL = "sales"
+                        if (API_NAMESPACE_RESTFUL == "storlead-centre-api") {
+                            API_NAMESPACE_RESTFUL = "api"
                         }
                         echo "处理镜像推送"
                     }
@@ -291,7 +291,7 @@ pipeline {
                           echo '
   version: "3.7"
   services:
-    ${ARTIFACTID}-${params.module}-${params.profile}:
+    ${params.module}-${params.profile}:
       image: ${DOCKER_IMG_NAME}
       deploy:
         replicas: ${SWARM_INIT_REPLICAS_NUM}
@@ -332,7 +332,7 @@ pipeline {
   networks:
     vonedao_net:
        external: true
-                          ' > ${ARTIFACTID}-${params.module}-${params.profile}-stack.yml
+                          ' > ${params.module}-${params.profile}-stack.yml
                          """
                         //                        if (params.profile =="dev") {
                         //                            sh "docker stack deploy -c ${ARTIFACTID}-${params.profile}-stack.yml ${ARTIFACTID}-${params.profile}"
@@ -342,8 +342,8 @@ pipeline {
                         //                            sh "docker run -d --restart=always -p ${API_PORT}:${API_PORT} -p ${API_REMOTE_DEBUG_PORT}:${API_REMOTE_DEBUG_PORT} -v /app:/app --name ${ARTIFACTID} ${DOCKER_IMG_NAME}"
                         //                        } else {
                         // 全部都以swarm 模式启动
-                        sshPut remote: remote, from: "${ARTIFACTID}-${params.module}-${params.profile}-stack.yml", into: "/docker/sp/${ARTIFACTID}-${params.module}-${params.profile}-stack.yml"
-                        sshCommand remote: remote, command: "docker stack deploy --resolve-image=always --with-registry-auth -c /docker/sp/${ARTIFACTID}-${params.module}-${params.profile}-stack.yml ${params.module}-${params.profile}"
+                        sshPut remote: remote, from: "${params.module}-${params.profile}-stack.yml", into: "/docker/sp/${params.module}-${params.profile}-stack.yml"
+                        sshCommand remote: remote, command: "docker stack deploy --resolve-image=always --with-registry-auth -c /docker/sp/${params.module}-${params.profile}-stack.yml ${params.module}-${params.profile}"
                         //                        }
                     }
                 }

+ 2 - 2
storlead-centre-api/src/main/resources/application-test.yml

@@ -5,7 +5,7 @@ server:
     max-upload-size: 200MB
     basedir: /mnt/vdb/storlead/sales/temp/${spring.profiles.active}
   servlet:
-    context-path: /sales
+    context-path: /api
   compression:
     enabled: true
     min-response-size: 1024
@@ -106,7 +106,7 @@ spring:
       datasource:
         master:
           driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://mysql.test.storlead.com:39091/sp_unified_service_prod?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
+          url: jdbc:mysql://mysql.test.storlead.com:39091/sp_unified_service_test?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
           username: root
           password: rCgRgLjH99Xvg5BN
         oa: