提交 04ec1fee 编写于 作者: yanshaowei's avatar yanshaowei

docker镜像支持多平台(linux/amd64,linux/arm64)

上级 e44dabf6
......@@ -64,13 +64,23 @@ TARGET=PSSYSTEM
mvn clean package -P${pub.getPSApplication().getPKGCodeName()?lower_case}
<#if pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="SWARM") >
cd ${pub.getCodeName()?lower_case}-app/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()?lower_case}
<#if depapp.getUserParam("multiplatform","")?? && depapp.getUserParam("multiplatform","")=="true">
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} exec:exec@prepare
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} exec:exec@buildpush
<#else>
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:build
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:push
</#if>
docker -H $para1 stack deploy --compose-file=src/main/docker/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()?lower_case}.yaml ${depplatform.getName()} --with-registry-auth
<#elseif pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="K8S") >
cd ${pub.getCodeName()?lower_case}-app/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()?lower_case}
<#if depapp.getUserParam("multiplatform","")?? && depapp.getUserParam("multiplatform","")=="true">
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} exec:exec@prepare
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} exec:exec@buildpush
<#else>
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:build
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:push
</#if>
set +e
kubectl --kubeconfig ~/shanghai-demo-01 delete -f src/main/docker/${pub.getCodeName()?lower_case}-app-${pub.getPSApplication().getPKGCodeName()?lower_case}-k8s.yaml -n ${depplatform.getName()?lower_case}
set -e
......@@ -88,13 +98,23 @@ TARGET=PSSYSTEM
mvn clean package -P${pub.getPSSysServiceAPI().getCodeName()?lower_case}
<#if pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="SWARM") >
cd ${pub.getCodeName()?lower_case}-provider/${pub.getCodeName()?lower_case}-provider-${pub.getPSSysServiceAPI().getCodeName()?lower_case}
<#if depapi.getUserParam("multiplatform","")?? && depapi.getUserParam("multiplatform","")=="true">
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} exec:exec@prepare
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} exec:exec@buildpush
<#else>
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:build
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:push
</#if>
docker -H $para1 stack deploy --compose-file=src/main/docker/${pub.getCodeName()?lower_case}-provider-${pub.getPSSysServiceAPI().getCodeName()?lower_case}.yaml ${depplatform.getName()} --with-registry-auth
<#elseif pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="K8S") >
cd ${pub.getCodeName()?lower_case}-provider/${pub.getCodeName()?lower_case}-provider-${pub.getPSSysServiceAPI().getCodeName()?lower_case}
<#if depapi.getUserParam("multiplatform","")?? && depapi.getUserParam("multiplatform","")=="true">
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} exec:exec@prepare
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} exec:exec@buildpush
<#else>
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:build
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:push
</#if>
set +e
kubectl --kubeconfig ~/shanghai-demo-01 delete -f src/main/docker/${pub.getCodeName()?lower_case}-provider-${pub.getPSSysServiceAPI().getCodeName()?lower_case}-k8s.yaml -n ${depplatform.getName()?lower_case}
set -e
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册