Skip to content
Snippets Groups Projects
Commit 8dfa17b9 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4717 Removed old refernece to BuildUrl, added buildnumber from Jenkins

parent 455d38a5
Branches
Tags
No related merge requests found
......@@ -47,6 +47,7 @@ pipeline {
}
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS versions:set-property -Dproperty="build.number" -DnewVersion=${currentBuild.number}'
sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3 -DelasticTests.disabled=true'
}
}
......
......@@ -14,6 +14,9 @@
<version>1.0.0-SNAPSHOT</version>
<name>Administration</name>
<description>Administration Backend Project</description>
<properties>
<build.number>?</build.number>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
......@@ -79,6 +82,11 @@
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<number>${build.number}</number>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
......
......@@ -18,18 +18,14 @@ class RootService {
}
public Instant getBuildTime() {
return buildProperties.map(BuildProperties::getTime).orElse(Instant.now());
return buildProperties.map(BuildProperties::getTime).orElse(null);
}
public String getJavaVersion() {
return System.getProperty("java.version", "?");
return System.getProperty("java.version");
}
public String getBuildNumber() {
return buildProperties.map(p -> p.get("number")).orElse("?");
}
public String getBuildUrl() {
return buildProperties.map(p -> p.get("url")).orElse("?");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment