spring-jenkins-actuator
SpringBoot Jenkins Actuator
Maven
<dependency>
<groupId>com.itelg.spring</groupId>
<artifactId>spring-jenkins-actuator</artifactId>
<version>1.0.2-RELEASE</version>
</dependency>
Example
@Bean
public HealthIndicator jenkinsHealthIndicator()
{
return new JenkinsHealthIndicator("http://jenkins.com");
}
@Bean
public HealthIndicator jenkinsHealthIndicator()
{
return new JenkinsHealthIndicator("http://jenkins.com", "admin", "secretPassword");
}
Response (health.json)
{
"status" : "UP",
"jenkins" :
{
"status" : "UP",
"version" : "2.42"
}
}
Build & Release
Build
mvn clean package
Release
mvn clean deploy