luofuwen 6 mesi fa
parent
commit
7f5140e2f2
1 ha cambiato i file con 22 aggiunte e 22 eliminazioni
  1. 22 22
      .drone.yml

+ 22 - 22
.drone.yml

@@ -1,8 +1,8 @@
 #########################################################################################################
-# 1.打包构建lhb-gateway
+# 1.打包构建release-lhb-gateway
 kind: pipeline
 type: docker
-name: lhb-gateway-prod
+name: release-lhb-gateway
 
 volumes:
   - name: mvn_repo
@@ -13,7 +13,7 @@ volumes:
       path: /home/ABServer/config/mvn
   - name: build-artifacts
     host:
-      path: /home/ABServer/webroot/lhb-gateway
+      path: /home/ABServer/webroot/release-lhb-gateway
   - name: dockerfile-source
     host:
       path: /home/ABServer/config/docker
@@ -58,7 +58,7 @@ steps:
       - cp -v lhb-gateway/target/*.jar /context/
       - cp -rv lhb-gateway/target/lib /context/
       - cp -rv lhb-gateway/target/config /context/
-      - cp /dockerfiles/template-min.dockerfile /context/Dockerfile
+      - cp /dockerfiles/template-prod.dockerfile /context/Dockerfile
       - sed -i 's/{Xms}/1024m/g' /context/Dockerfile
       - sed -i 's/{Xmx}/1024m/g' /context/Dockerfile
       - sed -i 's/{ImageName}/lhb-gateway/g' /context/Dockerfile
@@ -84,7 +84,7 @@ steps:
     commands:
       - docker login -u "$HARBOR_USER" -p "$HARBOR_PASS" harbor.kexiaoshuang.com
       - cd /context
-      - TAG=$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
+      - TAG=prod-$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
       - docker build -t "harbor.kexiaoshuang.com/laihaoba/lhb-gateway:$TAG" .
       - docker push "harbor.kexiaoshuang.com/laihaoba/lhb-gateway:$TAG"
       - docker rmi "harbor.kexiaoshuang.com/laihaoba/lhb-gateway:$TAG"
@@ -94,12 +94,12 @@ trigger:
   branch: [ release-gateway ]
 
 #########################################################################################################
-#2.打包构建lhb-quartz-prod
+#2.打包构建release-lhb-quartz
 
 ---
 kind: pipeline
 type: docker
-name: lhb-quartz-prod
+name: release-lhb-quartz
 
 volumes:
   - name: mvn_repo
@@ -110,7 +110,7 @@ volumes:
       path: /home/ABServer/config/mvn
   - name: build-artifacts
     host:
-      path: /home/ABServer/webroot/lhb-quartz
+      path: /home/ABServer/webroot/release-lhb-quartz
   - name: dockerfile-source
     host:
       path: /home/ABServer/config/docker
@@ -155,9 +155,9 @@ steps:
       - cp -v lhb-quartz/target/*.jar /context/
       - cp -rv lhb-quartz/target/lib /context/
       - cp -rv lhb-quartz/target/config /context/
-      - cp /dockerfiles/template-min.dockerfile /context/Dockerfile
-      - sed -i 's/{Xms}/256m/g' /context/Dockerfile
-      - sed -i 's/{Xmx}/256m/g' /context/Dockerfile
+      - cp /dockerfiles/template-prod.dockerfile /context/Dockerfile
+      - sed -i 's/{Xms}/512m/g' /context/Dockerfile
+      - sed -i 's/{Xmx}/512m/g' /context/Dockerfile
       - sed -i 's/{ImageName}/lhb-quartz/g' /context/Dockerfile
       - echo -e "*\n!*.jar\n!lib/\n!config/\n!Dockerfile" > /context/.dockerignore
       - ls -alR /context
@@ -181,7 +181,7 @@ steps:
     commands:
       - docker login -u "$HARBOR_USER" -p "$HARBOR_PASS" harbor.kexiaoshuang.com
       - cd /context
-      - TAG=$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
+      - TAG=prod-$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
       - docker build -t "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG" .
       - docker push "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG"
       - docker rmi "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG"
@@ -191,12 +191,12 @@ trigger:
   branch: [ release-quartz ]
 
 ###########################################################################################################
-# 3.打包构建lhb-system-prod
+# 3.打包构建release-lhb-system
 
 ---
 kind: pipeline
 type: docker
-name: lhb-system-prod
+name: release-lhb-system
 
 # 定义所有 Volume 映射
 volumes:
@@ -208,7 +208,7 @@ volumes:
       path: /home/ABServer/config/mvn
   - name: build-artifacts  # 构建产物临时目录
     host:
-      path: /home/ABServer/webroot/lhb-system
+      path: /home/ABServer/webroot/release-lhb-system
   - name: dockerfile-source
     host:
       path: /home/ABServer/config/docker
@@ -253,7 +253,7 @@ steps:
       - cp -v lhb-system/lhb-system-biz/target/*.jar /context/
       - cp -rv lhb-system/lhb-system-biz/target/lib /context/
       - cp -rv lhb-system/lhb-system-biz/target/config /context/
-      - cp /dockerfiles/template-biz-min.dockerfile /context/Dockerfile
+      - cp /dockerfiles/template-biz-prod.dockerfile /context/Dockerfile
       - sed -i 's/{Xms}/512m/g' /context/Dockerfile
       - sed -i 's/{Xmx}/512m/g' /context/Dockerfile
       - sed -i 's/{ImageName}/lhb-system/g' /context/Dockerfile
@@ -280,7 +280,7 @@ steps:
     commands:
       - docker login -u "$HARBOR_USER" -p "$HARBOR_PASS" harbor.kexiaoshuang.com
       - cd /context
-      - TAG=$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
+      - TAG=prod-$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
       - docker build -t "harbor.kexiaoshuang.com/laihaoba/lhb-system:$TAG" .
       - docker push "harbor.kexiaoshuang.com/laihaoba/lhb-system:$TAG"
       - docker rmi "harbor.kexiaoshuang.com/laihaoba/lhb-system:$TAG"
@@ -291,12 +291,12 @@ trigger:
 
 
 ##########################################################################################################
-# 4.打包构建lhb-basic
+# 4.打包构建release-lhb-basic
 
 ---
 kind: pipeline
 type: docker
-name: lhb-basic-prod
+name: release-lhb-basic
 
 # 定义所有 Volume 映射
 volumes:
@@ -308,7 +308,7 @@ volumes:
       path: /home/ABServer/config/mvn
   - name: build-artifacts  # 构建产物临时目录
     host:
-      path: /home/ABServer/webroot/lhb-basic
+      path: /home/ABServer/webroot/release-lhb-basic
   - name: dockerfile-source
     host:
       path: /home/ABServer/config/docker
@@ -353,7 +353,7 @@ steps:
       - cp -v lhb-basic/lhb-basic-biz/target/*.jar /context/
       - cp -rv lhb-basic/lhb-basic-biz/target/lib /context/
       - cp -rv lhb-basic/lhb-basic-biz/target/config /context/
-      - cp /dockerfiles/template-biz-min.dockerfile /context/Dockerfile
+      - cp /dockerfiles/template-biz-prod.dockerfile /context/Dockerfile
       - sed -i 's/{Xms}/512m/g' /context/Dockerfile
       - sed -i 's/{Xmx}/512m/g' /context/Dockerfile
       - sed -i 's/{ImageName}/lhb-basic/g' /context/Dockerfile
@@ -380,7 +380,7 @@ steps:
     commands:
       - docker login -u "$HARBOR_USER" -p "$HARBOR_PASS" harbor.kexiaoshuang.com
       - cd /context
-      - TAG=$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
+      - TAG=prod-$(date +%Y%m%d%H%M%S)-${DRONE_COMMIT_SHA:0:10}
       - docker build -t "harbor.kexiaoshuang.com/laihaoba/lhb-basic:$TAG" .
       - docker push "harbor.kexiaoshuang.com/laihaoba/lhb-basic:$TAG"
       - docker rmi "harbor.kexiaoshuang.com/laihaoba/lhb-basic:$TAG"