提交 0b2166a2 编写于 作者: yanshaowei's avatar yanshaowei

arm平台支持东方通打包

上级 d3209310
......@@ -235,6 +235,60 @@ TARGET=PSSYSAPP
</execution>
</executions>
</plugin>
<#if pub.getPSDeployCenter()?? && pub.getPSDeployCenter().getPSRegistryRepo()??>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${r'${docker.image.prefix}/${project.artifactId}'}:latest</imageName>
<dockerDirectory>${r'${project.basedir}'}/src/main/dockerwar</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${r'${project.artifactId}'}.war</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>prepare</id>
<configuration>
<executable>cp</executable>
<arguments>
<argument>../../${r'${project.artifactId}'}.war</argument>
<argument>${r'${project.basedir}'}/src/main/dockerwar/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>buildpush</id>
<configuration>
<executable>docker</executable>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>--platform</argument>
<argument>linux/amd64,linux/arm64</argument>
<argument>-t</argument>
<argument>${r'${docker.image.prefix}/${project.artifactId}'}:latest</argument>
<argument>${r'${project.basedir}'}/src/main/dockerwar</argument>
<argument>--push</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</#if>
</plugins>
</build>
</profile>
......
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
FROM registry.cn-shanghai.aliyuncs.com/ibizops/tongweb:arm-7.0
ENV TZ Asia/Shanghai
ENV LANG C.UTF-8
WORKDIR /opt/tongtech
ADD ${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.war .
CMD echo -e 'export LANG="zh_CN.UTF-8"\nexport LC_ALL="zh_CN.UTF-8"' > /etc/locale.conf && \
unzip -oq /opt/tongtech/${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.war -d /opt/tongtech/TongWeb7.0/deployment/jcyweb && \
/opt/tongtech/TongWeb7.0/bin/startserver.sh
......@@ -156,6 +156,60 @@ TARGET=PSSYSSERVICEAPI
</execution>
</executions>
</plugin>
<#if pub.getPSDeployCenter()?? && pub.getPSDeployCenter().getPSRegistryRepo()??>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${r'${docker.image.prefix}/${project.artifactId}'}:latest</imageName>
<dockerDirectory>${r'${project.basedir}'}/src/main/dockerwar</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${r'${project.artifactId}'}.war</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>prepare</id>
<configuration>
<executable>cp</executable>
<arguments>
<argument>../../${r'${project.artifactId}'}.war</argument>
<argument>${r'${project.basedir}'}/src/main/dockerwar/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>buildpush</id>
<configuration>
<executable>docker</executable>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>--platform</argument>
<argument>linux/amd64,linux/arm64</argument>
<argument>-t</argument>
<argument>${r'${docker.image.prefix}/${project.artifactId}'}:latest</argument>
<argument>${r'${project.basedir}'}/src/main/dockerwar</argument>
<argument>--push</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</#if>
</plugins>
</build>
</profile>
......
<#ibiztemplate>
TARGET=PSSYSSERVICEAPI
</#ibiztemplate>
FROM registry.cn-shanghai.aliyuncs.com/ibizops/tongweb:arm-7.0
ENV TZ Asia/Shanghai
ENV LANG C.UTF-8
WORKDIR /opt/tongtech
ADD ${pub.getCodeName()?lower_case}-provider-${api.getCodeName()?lower_case}.war .
CMD echo -e 'export LANG="zh_CN.UTF-8"\nexport LC_ALL="zh_CN.UTF-8"' > /etc/locale.conf && \
unzip -oq /opt/tongtech/${pub.getCodeName()?lower_case}-provider-${api.getCodeName()?lower_case}.war -d /opt/tongtech/TongWeb7.0/deployment/jcyweb && \
/opt/tongtech/TongWeb7.0/bin/startserver.sh
......@@ -68,6 +68,9 @@ TARGET=PSSYSTEM
<#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
<#elseif depapp.getUserParam("ibiz.deploy.packagetype","")?? && depapp.getUserParam("ibiz.deploy.packagetype","")=="war">
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case}-war exec:exec@prepare
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case}-war exec:exec@buildpush
<#else>
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:build
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:push
......@@ -78,6 +81,9 @@ TARGET=PSSYSTEM
<#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
<#elseif depapp.getUserParam("ibiz.deploy.packagetype","")?? && depapp.getUserParam("ibiz.deploy.packagetype","")=="war">
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case}-war exec:exec@prepare
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case}-war exec:exec@buildpush
<#else>
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:build
mvn -P${pub.getPSApplication().getPKGCodeName()?lower_case} docker:push
......@@ -103,6 +109,9 @@ TARGET=PSSYSTEM
<#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
<#elseif depapi.getUserParam("ibiz.deploy.packagetype","")?? && depapi.getUserParam("ibiz.deploy.packagetype","")=="war">
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case}-war exec:exec@prepare
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case}-war exec:exec@buildpush
<#else>
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:build
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:push
......@@ -113,6 +122,9 @@ TARGET=PSSYSTEM
<#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
<#elseif depapi.getUserParam("ibiz.deploy.packagetype","")?? && depapi.getUserParam("ibiz.deploy.packagetype","")=="war">
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case}-war exec:exec@prepare
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case}-war exec:exec@buildpush
<#else>
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:build
mvn -P${pub.getPSSysServiceAPI().getCodeName()?lower_case} docker:push
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册