first-fix
This commit is contained in:
1 parent
6d87c1edc8
commit
565d9d673a
6284 files changed
+820267
-76
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright © 2016-2023 The Thingsboard Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
FROM thingsboard/openjdk11:bullseye-slim
|
||||
|
||||
COPY start-tb-vc-executor.sh ${pkg.name}.deb /tmp/
|
||||
|
||||
RUN mkdir -p /home/thingsboard/.config/jgit \
|
||||
&& chown -R ${pkg.user}:${pkg.user} /home/thingsboard \
|
||||
&& chmod a+x /tmp/*.sh \
|
||||
&& mv /tmp/start-tb-vc-executor.sh /usr/bin && \
|
||||
(yes | dpkg -i /tmp/${pkg.name}.deb) && \
|
||||
rm /tmp/${pkg.name}.deb && \
|
||||
(systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :) && \
|
||||
chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar
|
||||
|
||||
USER ${pkg.user}
|
||||
|
||||
CMD ["start-tb-vc-executor.sh"]
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright © 2016-2023 The Thingsboard Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
CONF_FOLDER="/config"
|
||||
jarfile=${pkg.installFolder}/bin/${pkg.name}.jar
|
||||
configfile=${pkg.name}.conf
|
||||
|
||||
source "${CONF_FOLDER}/${configfile}"
|
||||
|
||||
export LOADER_PATH=/config,${LOADER_PATH}
|
||||
|
||||
echo "Starting '${project.name}' ..."
|
||||
|
||||
cd ${pkg.installFolder}/bin
|
||||
|
||||
exec java -cp ${jarfile} $JAVA_OPTS -Dloader.main=org.thingsboard.server.vc.ThingsboardVersionControlExecutorApplication \
|
||||
-Dspring.jpa.hibernate.ddl-auto=none \
|
||||
-Dlogging.config=/config/logback.xml \
|
||||
org.springframework.boot.loader.PropertiesLauncher
|
||||
@@ -0,0 +1,189 @@
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2023 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<version>0.6.2-SNAPSHOT</version>
|
||||
<artifactId>msa</artifactId>
|
||||
</parent>
|
||||
<groupId>org.thingsboard.msa</groupId>
|
||||
<artifactId>vc-executor-docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ThingsBoard Version Control Executor Microservice</name>
|
||||
<url>https://thingsboard.io</url>
|
||||
<description>ThingsBoard Version Control Executor Microservice</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<main.dir>${basedir}/../..</main.dir>
|
||||
<pkg.name>tb-vc-executor</pkg.name>
|
||||
<docker.name>tb-vc-executor</docker.name>
|
||||
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
|
||||
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
|
||||
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.thingsboard.msa</groupId>
|
||||
<artifactId>vc-executor</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>deb</classifier>
|
||||
<type>deb</type>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-tb-vc-executor-deb</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.thingsboard.msa</groupId>
|
||||
<artifactId>vc-executor</artifactId>
|
||||
<classifier>deb</classifier>
|
||||
<type>deb</type>
|
||||
<destFileName>${pkg.name}.deb</destFileName>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-docker-config</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>docker</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-docker-image</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${dockerfile.skip}</skip>
|
||||
<repository>${docker.repo}/${docker.name}</repository>
|
||||
<verbose>true</verbose>
|
||||
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
|
||||
<contextDirectory>${project.build.directory}</contextDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tag-docker-image</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>tag</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${dockerfile.skip}</skip>
|
||||
<repository>${docker.repo}/${docker.name}</repository>
|
||||
<tag>${project.version}</tag>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>push-docker-image</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>push-docker-image</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>push-latest-docker-image</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tag>latest</tag>
|
||||
<repository>${docker.repo}/${docker.name}</repository>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>push-version-docker-image</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tag>${project.version}</tag>
|
||||
<repository>${docker.repo}/${docker.name}</repository>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jenkins</id>
|
||||
<name>Jenkins Repository</name>
|
||||
<url>https://repo.jenkins-ci.org/releases</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
Reference in new issue
Block a user