add git version

This commit is contained in:
yanhuqing
2018-07-06 16:31:20 +08:00
parent 3d1f096980
commit cdc6a948a6
4 changed files with 24 additions and 9 deletions

25
pom.xml
View File

@@ -11,9 +11,6 @@
<properties>
<app.encoding>UTF-8</app.encoding>
<!-- maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
<buildNumber>${maven.build.timestamp}</buildNumber -->
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<version.template.file>version.txt.template</version.template.file>
<version.file>version.txt</version.file>
<server.comment>dble Server (ActionTech)</server.comment>
@@ -395,9 +392,13 @@
<file>${project.basedir}/${version.template.file}</file>
<outputFile>${project.basedir}/${version.file}</outputFile>
<replacements>
<replacement>
<token>@gitcommitid@</token>
<value>${git.commit.id}</value>
</replacement>
<replacement>
<token>@buildtime@</token>
<value>${maven.build.timestamp}</value>
<value>${timestamp}</value>
</replacement>
<replacement>
<token>@pomversion@</token>
@@ -432,7 +433,7 @@
<replacements>
<replacement>
<token>@server-version@</token>
<value>5.6.29-dble-${project.version}-${timestamp}</value>
<value>5.6.29-dble-${project.version}-${git.commit.id}-${timestamp}</value>
</replacement>
<replacement>
<token>@version-comment@</token>
@@ -653,7 +654,19 @@
<timestampFormat>yyyyMMddHHmmss</timestampFormat>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>

View File

@@ -372,8 +372,8 @@ public abstract class PhysicalDatasource {
public void connectionError(Throwable e, BackendConnection conn) {
Map<String, String> labels = AlertUtil.genSingleLabel("data_host", hostConfig.getName() + "-" + config.getHostName());
AlertUtil.alert(AlarmCode.CREATE_CONN_FAIL, Alert.AlertLevel.WARN, "createNewConn Error" + e.getMessage(), "mysql", config.getId(), labels);
handler.connectionError(e, conn);
createConnAlert = true;
handler.connectionError(e, conn);
}
@Override

View File

@@ -1,5 +1,6 @@
BuildTime 2018-05-07 08:17:48
MavenVersion 2.18.06.0-dev
GitVersion 3d1f096980d7a067913aa329db0280ce8d2e743c
BuildTime 20180706161245
MavenVersion 9.9.9.9
GitUrl https://github.com/actiontech/dble
WebSite http://dble.cloud/
QQGroup 669663113

View File

@@ -1,3 +1,4 @@
GitVersion @gitcommitid@
BuildTime @buildtime@
MavenVersion @pomversion@
GitUrl @giturl@