Docker linux/arm64 support
This commit is contained in:
parent
38b08ff769
commit
9bc12ab6d7
@ -16,13 +16,19 @@
|
|||||||
|
|
||||||
FROM thingsboard/base
|
FROM thingsboard/base
|
||||||
|
|
||||||
COPY start-js-executor.sh ${pkg.name}.deb /tmp/
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
|
COPY start-js-executor.sh ${pkg.name}.deb ${pkg.name}-arm64.deb /tmp/
|
||||||
|
|
||||||
RUN chmod a+x /tmp/*.sh \
|
RUN chmod a+x /tmp/*.sh \
|
||||||
&& mv /tmp/start-js-executor.sh /usr/bin
|
&& mv /tmp/start-js-executor.sh /usr/bin
|
||||||
|
|
||||||
RUN yes | dpkg -i /tmp/${pkg.name}.deb
|
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; \
|
||||||
|
then yes | dpkg -i /tmp/${pkg.name}-arm64.deb; \
|
||||||
|
else yes | dpkg -i /tmp/${pkg.name}.deb; \
|
||||||
|
fi
|
||||||
RUN rm /tmp/${pkg.name}.deb
|
RUN rm /tmp/${pkg.name}.deb
|
||||||
|
RUN rm /tmp/${pkg.name}-arm64.deb
|
||||||
|
|
||||||
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
|
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|||||||
@ -21,10 +21,13 @@ let _projectRoot = null;
|
|||||||
|
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-js-executor-linux'),
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-js-executor-linux-x64'),
|
||||||
path.join(targetPackageDir('linux'), 'bin', 'tb-js-executor'),
|
path.join(targetPackageDir('linux'), 'bin', 'tb-js-executor'),
|
||||||
{overwrite: true});
|
{overwrite: true});
|
||||||
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-js-executor-win.exe'),
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-js-executor-linux-arm64'),
|
||||||
|
path.join(targetPackageDir('linux'), 'bin-arm64', 'tb-js-executor'),
|
||||||
|
{overwrite: true});
|
||||||
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-js-executor-win-x64.exe'),
|
||||||
path.join(targetPackageDir('windows'), 'bin', 'tb-js-executor.exe'),
|
path.join(targetPackageDir('windows'), 'bin', 'tb-js-executor.exe'),
|
||||||
{overwrite: true});
|
{overwrite: true});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"bin": "server.js",
|
"bin": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "pkg -t node12-linux-x64,node12-win-x64 --out-path ./target . && node install.js",
|
"install": "pkg -t node12-linux-x64,node12-linux-arm64,node12-win-x64 --out-path ./target . && node install.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"start": "nodemon server.js",
|
"start": "nodemon server.js",
|
||||||
"start-prod": "NODE_ENV=production nodemon server.js"
|
"start-prod": "NODE_ENV=production nodemon server.js"
|
||||||
|
|||||||
@ -42,6 +42,7 @@
|
|||||||
<pkg.package.phase>package</pkg.package.phase>
|
<pkg.package.phase>package</pkg.package.phase>
|
||||||
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
|
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
|
||||||
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
|
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
63
msa/pom.xml
63
msa/pom.xml
@ -35,6 +35,7 @@
|
|||||||
<dockerfile.skip>true</dockerfile.skip>
|
<dockerfile.skip>true</dockerfile.skip>
|
||||||
<blackBoxTests.skip>true</blackBoxTests.skip>
|
<blackBoxTests.skip>true</blackBoxTests.skip>
|
||||||
<dockerfile-maven.version>1.4.13</dockerfile-maven.version>
|
<dockerfile-maven.version>1.4.13</dockerfile-maven.version>
|
||||||
|
<docker.push-arm-amd-image.phase>none</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@ -58,8 +59,67 @@
|
|||||||
<module>black-box-tests</module>
|
<module>black-box-tests</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>push-docker-amd-arm-images</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>push-docker-amd-arm-images</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>push-latest-docker-amd-arm-images</id>
|
||||||
|
<phase>${docker.push-arm-amd-image.phase}</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${docker.name}:latest</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-version-docker-amd-arm-images</id>
|
||||||
|
<phase>${docker.push-arm-amd-image.phase}</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension>
|
<extension>
|
||||||
@ -78,5 +138,4 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
<docker.name>tb-node</docker.name>
|
<docker.name>tb-node</docker.name>
|
||||||
<pkg.unixLogFolder>/var/log/${pkg.name}</pkg.unixLogFolder>
|
<pkg.unixLogFolder>/var/log/${pkg.name}</pkg.unixLogFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
144
msa/tb/pom.xml
144
msa/tb/pom.xml
@ -355,6 +355,150 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>push-docker-amd-arm-images</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>push-docker-amd-arm-images</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>push-latest-docker-amd-arm-tb-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-tb</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb.docker.name}:latest</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-version-docker-amd-arm-tb-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-tb</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb.docker.name}:${project.version}</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-latest-docker-amd-arm-tb-postgres-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-postgres</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb-postgres.docker.name}:latest</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-version-docker-amd-arm-tb-postgres-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-postgres</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb-postgres.docker.name}:${project.version}</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-latest-docker-amd-arm-tb-cassandra-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-cassandra</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb-cassandra.docker.name}:latest</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>push-version-docker-amd-arm-tb-cassandra-images</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<workingDirectory>${project.build.directory}/docker-cassandra</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>buildx</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
<argument>-t</argument>
|
||||||
|
<argument>${docker.repo}/${tb-cassandra.docker.name}:${project.version}</argument>
|
||||||
|
<argument>--platform=linux/amd64,linux/arm64</argument>
|
||||||
|
<argument>-o</argument>
|
||||||
|
<argument>type=registry</argument>
|
||||||
|
<argument>.</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
<docker.name>tb-coap-transport</docker.name>
|
<docker.name>tb-coap-transport</docker.name>
|
||||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
<docker.name>tb-http-transport</docker.name>
|
<docker.name>tb-http-transport</docker.name>
|
||||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
<docker.name>tb-lwm2m-transport</docker.name>
|
<docker.name>tb-lwm2m-transport</docker.name>
|
||||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
<docker.name>tb-mqtt-transport</docker.name>
|
<docker.name>tb-mqtt-transport</docker.name>
|
||||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
<docker.name>tb-snmp-transport</docker.name>
|
<docker.name>tb-snmp-transport</docker.name>
|
||||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -16,13 +16,19 @@
|
|||||||
|
|
||||||
FROM thingsboard/base
|
FROM thingsboard/base
|
||||||
|
|
||||||
COPY start-web-ui.sh ${pkg.name}.deb /tmp/
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
|
COPY start-web-ui.sh ${pkg.name}.deb ${pkg.name}-arm64.deb /tmp/
|
||||||
|
|
||||||
RUN chmod a+x /tmp/*.sh \
|
RUN chmod a+x /tmp/*.sh \
|
||||||
&& mv /tmp/start-web-ui.sh /usr/bin
|
&& mv /tmp/start-web-ui.sh /usr/bin
|
||||||
|
|
||||||
RUN yes | dpkg -i /tmp/${pkg.name}.deb
|
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; \
|
||||||
|
then yes | dpkg -i /tmp/${pkg.name}-arm64.deb; \
|
||||||
|
else yes | dpkg -i /tmp/${pkg.name}.deb; \
|
||||||
|
fi
|
||||||
RUN rm /tmp/${pkg.name}.deb
|
RUN rm /tmp/${pkg.name}.deb
|
||||||
|
RUN rm /tmp/${pkg.name}-arm64.deb
|
||||||
|
|
||||||
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
|
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|||||||
@ -21,10 +21,13 @@ let _projectRoot = null;
|
|||||||
|
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-web-ui-linux'),
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-web-ui-linux-x64'),
|
||||||
path.join(targetPackageDir('linux'), 'bin', 'tb-web-ui'),
|
path.join(targetPackageDir('linux'), 'bin', 'tb-web-ui'),
|
||||||
{overwrite: true});
|
{overwrite: true});
|
||||||
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-web-ui-win.exe'),
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-web-ui-linux-arm64'),
|
||||||
|
path.join(targetPackageDir('linux'), 'bin-arm64', 'tb-web-ui'),
|
||||||
|
{overwrite: true});
|
||||||
|
await fse.move(path.join(projectRoot(), 'target', 'thingsboard-web-ui-win-x64.exe'),
|
||||||
path.join(targetPackageDir('windows'), 'bin', 'tb-web-ui.exe'),
|
path.join(targetPackageDir('windows'), 'bin', 'tb-web-ui.exe'),
|
||||||
{overwrite: true});
|
{overwrite: true});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"bin": "server.js",
|
"bin": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "pkg -t node12-linux-x64,node12-win-x64 --out-path ./target . && node install.js",
|
"install": "pkg -t node12-linux-x64,node12-linux-arm64,node12-win-x64 --out-path ./target . && node install.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"start": "WEB_FOLDER=./target/web nodemon server.js",
|
"start": "WEB_FOLDER=./target/web nodemon server.js",
|
||||||
"start-prod": "NODE_ENV=production nodemon server.js"
|
"start-prod": "NODE_ENV=production nodemon server.js"
|
||||||
|
|||||||
@ -44,6 +44,7 @@
|
|||||||
<pkg.package.phase>package</pkg.package.phase>
|
<pkg.package.phase>package</pkg.package.phase>
|
||||||
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
|
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
|
||||||
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
|
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
|
||||||
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -36,12 +36,6 @@ ospackage {
|
|||||||
user pkgUser
|
user pkgUser
|
||||||
permissionGroup pkgUser
|
permissionGroup pkgUser
|
||||||
|
|
||||||
// Copy the executable file
|
|
||||||
from("${buildDir}/package/linux/bin/${pkgName}") {
|
|
||||||
fileMode 0500
|
|
||||||
into "bin"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy the init file
|
// Copy the init file
|
||||||
from("${buildDir}/package/linux/init/template") {
|
from("${buildDir}/package/linux/init/template") {
|
||||||
fileMode 0500
|
fileMode 0500
|
||||||
@ -78,9 +72,17 @@ buildRpm {
|
|||||||
preUninstall file("${buildDir}/control/rpm/prerm")
|
preUninstall file("${buildDir}/control/rpm/prerm")
|
||||||
postUninstall file("${buildDir}/control/rpm/postrm")
|
postUninstall file("${buildDir}/control/rpm/postrm")
|
||||||
|
|
||||||
|
into pkgInstallFolder
|
||||||
|
|
||||||
user pkgUser
|
user pkgUser
|
||||||
permissionGroup pkgUser
|
permissionGroup pkgUser
|
||||||
|
|
||||||
|
// Copy the executable file
|
||||||
|
from("${buildDir}/package/linux/bin/${pkgName}") {
|
||||||
|
fileMode 0500
|
||||||
|
into "bin"
|
||||||
|
}
|
||||||
|
|
||||||
// Copy the system unit files
|
// Copy the system unit files
|
||||||
from("${buildDir}/control/template.service") {
|
from("${buildDir}/control/template.service") {
|
||||||
addParentDirs = false
|
addParentDirs = false
|
||||||
@ -111,9 +113,17 @@ buildDeb {
|
|||||||
preUninstall file("${buildDir}/control/deb/prerm")
|
preUninstall file("${buildDir}/control/deb/prerm")
|
||||||
postUninstall file("${buildDir}/control/deb/postrm")
|
postUninstall file("${buildDir}/control/deb/postrm")
|
||||||
|
|
||||||
|
into pkgInstallFolder
|
||||||
|
|
||||||
user pkgUser
|
user pkgUser
|
||||||
permissionGroup pkgUser
|
permissionGroup pkgUser
|
||||||
|
|
||||||
|
// Copy the executable file
|
||||||
|
from("${buildDir}/package/linux/bin/${pkgName}") {
|
||||||
|
fileMode 0500
|
||||||
|
into "bin"
|
||||||
|
}
|
||||||
|
|
||||||
// Copy the system unit files
|
// Copy the system unit files
|
||||||
from("${buildDir}/control/template.service") {
|
from("${buildDir}/control/template.service") {
|
||||||
addParentDirs = false
|
addParentDirs = false
|
||||||
@ -126,3 +136,46 @@ buildDeb {
|
|||||||
|
|
||||||
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
|
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Same as the buildRpm task
|
||||||
|
task buildDebArm64(type: Deb) {
|
||||||
|
|
||||||
|
arch = "arm64"
|
||||||
|
|
||||||
|
archiveFileName = "${pkgName}-arm64.deb"
|
||||||
|
|
||||||
|
configurationFile("${pkgInstallFolder}/conf/${pkgName}.conf")
|
||||||
|
configurationFile("${pkgInstallFolder}/conf/custom-environment-variables.yml")
|
||||||
|
configurationFile("${pkgInstallFolder}/conf/default.yml")
|
||||||
|
configurationFile("${pkgInstallFolder}/conf/logger.js")
|
||||||
|
|
||||||
|
preInstall file("${buildDir}/control/deb/preinst")
|
||||||
|
postInstall file("${buildDir}/control/deb/postinst")
|
||||||
|
preUninstall file("${buildDir}/control/deb/prerm")
|
||||||
|
postUninstall file("${buildDir}/control/deb/postrm")
|
||||||
|
|
||||||
|
into pkgInstallFolder
|
||||||
|
|
||||||
|
user pkgUser
|
||||||
|
permissionGroup pkgUser
|
||||||
|
|
||||||
|
// Copy the executable file
|
||||||
|
from("${buildDir}/package/linux/bin-arm64/${pkgName}") {
|
||||||
|
fileMode 0500
|
||||||
|
into "bin"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the system unit files
|
||||||
|
from("${buildDir}/control/template.service") {
|
||||||
|
addParentDirs = false
|
||||||
|
fileMode 0644
|
||||||
|
into "/lib/systemd/system"
|
||||||
|
rename { String filename ->
|
||||||
|
"${pkgName}.service"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildDeb.finalizedBy buildDebArm64
|
||||||
|
|||||||
5
pom.xml
5
pom.xml
@ -684,6 +684,11 @@
|
|||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>3.0.0-M1</version>
|
<version>3.0.0-M1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user