[Trunk | Monitor Service]:

1. pom.xml: Updated version of "uoa-admin-tools-library" from 1.0.1 to 1.0.2, "uoa-authorization-library" from 1.0.0 to 2.0.1, "uoa-notification-service" from 1.0.0 to 1.0.2.
2. GlobalVars.java: Added field "version" (version of project in pom).
3. MonitorServiceCheckDeployController.java: Expose globalBars.version in /health_check/advanced.
4. monitorservice.properties: Added monitorservice.globalVars.version=@version@ (initialized by pom version).
This commit is contained in:
Konstantina Galouni 2021-11-17 23:00:52 +00:00
parent 61a6d5d89d
commit a11cf9c642
4 changed files with 17 additions and 3 deletions

View File

@ -89,17 +89,18 @@
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>uoa-admin-tools-library</artifactId>
<version>1.0.1</version>
<!-- <version>1.0.1</version>-->
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>uoa-authorization-library</artifactId>
<version>1.0.0</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>uoa-notification-service</artifactId>
<version>1.0.0</version>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -8,6 +8,7 @@ import java.util.Date;
public class GlobalVars {
public static Date date = new Date();
private Date buildDate;
private String version;
public String getBuildDate() {
if(buildDate == null) {
@ -19,4 +20,12 @@ public class GlobalVars {
public void setBuildDate(Date buildDate) {
this.buildDate = buildDate;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -66,6 +66,9 @@ public class MonitorServiceCheckDeployController {
if(globalVars.getBuildDate() != null) {
response.put("Date of build", globalVars.getBuildDate());
}
if(globalVars.getVersion() != null) {
response.put("Version", globalVars.getVersion());
}
return response;
}

View File

@ -9,6 +9,7 @@ monitorservice.mongodb.host=localhost
monitorservice.mongodb.port=27017
monitorservice.mongodb.database=openaire_monitor3
monitorservice.globalVars.buildDate=@timestamp@
monitorservice.globalVars.version=@version@
#beta
#monitorservice.userInfoUrl = https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=