add distr
This commit is contained in:
parent
03527ee0a2
commit
4727045564
6 changed files with 1532 additions and 3 deletions
27
pom.xml
27
pom.xml
|
|
@ -14,19 +14,23 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>clearing-parent</module>
|
<module>clearing-parent</module>
|
||||||
<module>platform-parent</module>
|
<module>platform-parent</module>
|
||||||
|
<module>z-distr</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>11</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>11</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
||||||
<project.java.version>11</project.java.version>
|
<project.java.version>17</project.java.version>
|
||||||
<built.by>Maven</built.by>
|
<built.by>Maven</built.by>
|
||||||
|
|
||||||
<global.project.version>SPCEX-1.0.0.0</global.project.version>
|
<global.project.version>SPCEX-1.0.0.0</global.project.version>
|
||||||
|
|
||||||
<spring-boot.version>2.3.12.RELEASE</spring-boot.version>
|
<spring-boot.version>2.3.12.RELEASE</spring-boot.version>
|
||||||
|
|
||||||
|
<!--suppress UnresolvedMavenProperty -->
|
||||||
|
<folder_root_clearing>${folder_root_clearing_temp}</folder_root_clearing>
|
||||||
|
<folder_root_clearing_backend-api>${folder_root_clearing}/clearing-parent/backend-api</folder_root_clearing_backend-api>
|
||||||
<!-- IMDG -->
|
<!-- IMDG -->
|
||||||
<external_libraries.hazelcast.version>3.12.4</external_libraries.hazelcast.version>
|
<external_libraries.hazelcast.version>3.12.4</external_libraries.hazelcast.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
@ -165,6 +169,23 @@
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.commonjava.maven.plugins</groupId>
|
||||||
|
<artifactId>directory-maven-plugin</artifactId>
|
||||||
|
<version>0.3.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>directories</id>
|
||||||
|
<goals>
|
||||||
|
<goal>highest-basedir</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<configuration>
|
||||||
|
<property>folder_root_clearing_temp</property>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
147
z-distr/pom.xml
Normal file
147
z-distr/pom.xml
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>clearing</artifactId>
|
||||||
|
<groupId>ru.spcex.clearing</groupId>
|
||||||
|
<version>SPCEX-1.0.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>z-distr</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
|
<folder.clearing.distr>${project.basedir}/target/clearing</folder.clearing.distr>
|
||||||
|
<folder.clearing.distr.modules>${project.basedir}/target/clearing/modules</folder.clearing.distr.modules>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ru.spcex.clearing</groupId>
|
||||||
|
<artifactId>backend-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>distr</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<!-- Чистим target -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>auto-clean</id>
|
||||||
|
<phase>initialize</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>clean</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>${project.basedir}/target/clearing</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ РЕСУРСЫ ДИСТРИБА ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
||||||
|
<execution>
|
||||||
|
<id>distr--copy-resources</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${folder.clearing.distr}</outputDirectory>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources/distr</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.coderplus.maven.plugins</groupId>
|
||||||
|
<artifactId>copy-rename-maven-plugin</artifactId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-backend-api-bin</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sourceFile>${folder_root_clearing_backend-api}/target/backend-api.jar
|
||||||
|
</sourceFile>
|
||||||
|
<destinationFile>${folder.clearing.distr.modules}/backend-api/backend-api.jar</destinationFile>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/zip-distr.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<finalName>clearing</finalName>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>coverage</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>report-aggregate</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report-aggregate</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
</profiles>
|
||||||
|
</project>
|
||||||
1303
z-distr/src/main/assembly/assembly-1.1.0.xsd
Normal file
1303
z-distr/src/main/assembly/assembly-1.1.0.xsd
Normal file
File diff suppressed because it is too large
Load diff
14
z-distr/src/main/assembly/zip-distr.xml
Normal file
14
z-distr/src/main/assembly/zip-distr.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 assembly-1.1.0.xsd">
|
||||||
|
<id>distributive</id>
|
||||||
|
<baseDirectory>/</baseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/clearing</directory>
|
||||||
|
<outputDirectory>clearing-distributive</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
FROM debian:stable-20220125
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################################################################################
|
||||||
|
# Global system deps
|
||||||
|
###############################################################################################################################################
|
||||||
|
|
||||||
|
RUN apt update \
|
||||||
|
&& apt install apt-file -y \
|
||||||
|
&& apt upgrade -y
|
||||||
|
|
||||||
|
RUN apt install -y \
|
||||||
|
wget \
|
||||||
|
tzdata \
|
||||||
|
curl \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
|
###############################################################################################################################################
|
||||||
|
# Java
|
||||||
|
###############################################################################################################################################
|
||||||
|
|
||||||
|
ENV JAVA_VERSION jdk17.0.4+8
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
ESUM='637a742591f75447eaab1f23942db038d411686f'; \
|
||||||
|
BINARY_URL='https://download.bell-sw.com/java/17.0.4+8/bellsoft-jdk17.0.4+8-linux-amd64.tar.gz'; \
|
||||||
|
curl -LfsSo /tmp/bellsoft-jdk.tar.gz ${BINARY_URL}; \
|
||||||
|
mkdir -p /opt/java/bellsoft-jdk; \
|
||||||
|
cd /opt/java/bellsoft-jdk; \
|
||||||
|
tar -xf /tmp/bellsoft-jdk.tar.gz --strip-components=1; \
|
||||||
|
rm -rf /tmp/bellsoft-jdk.tar.gz;
|
||||||
|
|
||||||
|
RUN /opt/java/bellsoft-jdk/bin/java --version
|
||||||
|
|
||||||
|
ENV JAVA_HOME=/opt/java/bellsoft-jdk/ \
|
||||||
|
PATH="/opt/java/bellsoft-jdk/bin:$PATH"
|
||||||
|
|
||||||
|
RUN java --version
|
||||||
|
#
|
||||||
|
ADD backend-api.jar /deployments/backend-api.jar
|
||||||
|
USER root
|
||||||
|
RUN mkdir ./logs
|
||||||
|
ENV JAVA_APP_JAR=backend-api.jar
|
||||||
1
z-distr/src/main/resources/distr/modules/sh/buid.sh
Normal file
1
z-distr/src/main/resources/distr/modules/sh/buid.sh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
docker build -t backend-api ../backend-api/
|
||||||
Loading…
Add table
Reference in a new issue