浏览代码

更新 '.drone.yml'

修改打包镜像的堆内存
luofuwen 3 月之前
父节点
当前提交
858823b5db
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      .drone.yml

+ 9 - 1
.drone.yml

@@ -59,6 +59,8 @@ steps:
       - cp -rv lhb-gateway/target/lib /context/
       - cp -rv lhb-gateway/target/config /context/
       - cp /dockerfiles/template-min.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
       - echo -e "*\n!*.jar\n!lib/\n!config/\n!Dockerfile" > /context/.dockerignore
       - ls -alR /context
@@ -154,6 +156,8 @@ steps:
       - 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
       - sed -i 's/{ImageName}/lhb-quartz/g' /context/Dockerfile
       - echo -e "*\n!*.jar\n!lib/\n!config/\n!Dockerfile" > /context/.dockerignore
       - ls -alR /context
@@ -180,7 +184,7 @@ steps:
       - TAG=$(date +%Y%m%d%H%M%S)
       - docker build -t "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG" .
       - docker push "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG"
-      - docker rmi "harbor.kexiaoshuang.com/laihaobba/lhb-quartz:$TAG"
+      - docker rmi "harbor.kexiaoshuang.com/laihaoba/lhb-quartz:$TAG"
 
 trigger:
   event: [ push ]
@@ -250,6 +254,8 @@ steps:
       - 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
+      - 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
       - echo -e "*\n!*.jar\n!lib/\n!config/\n!Dockerfile" > /context/.dockerignore
       - echo "===== 构建上下文文件列表 ====="
@@ -348,6 +354,8 @@ steps:
       - 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
+      - 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
       - echo -e "*\n!*.jar\n!lib/\n!config/\n!Dockerfile" > /context/.dockerignore
       - echo "===== 构建上下文文件列表 ====="