Calls the health endpoint url of the application.
The intention of the check is to verify that a suitable health endpoint is available. Such a health endpoint is required for operation purposes.
This check is used as a real-life test for your productive health endpoints.
Typically, tools performing simple health checks are not too smart. Therefore it is important to choose an endpoint for checking wisely.
This check therefore only checks if the application/service url returns
This is in line with health check capabilities of platforms which are used for example in load balancing scenarios. Here you can find an example for Amazon AWS.
Endpoint for health check is configured.
The health endpoint needs to be available without authentication!
If using Spring Boot framework, ideally the provided
/health endpoint is used and extended by development. Further information can be found in the Spring Boot documentation for Endpoints
healthEndpoint- Optionally with
healthEndpointthe health function is called if endpoint is not the standard url.
script- The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the
thisparameter, as in
script: this. This allows the function to access the
commonPipelineEnvironmentfor retrieving, e.g. configuration parameters.
testServerUrl- Health check function is called providing full qualified
testServerUrlto the health check.
We recommend to define values of step parameters via config.yml file.
In following sections of the config.yml the configuration is possible:
The step depends on the following Jenkins plugins
Transitive dependencies are omitted.
The list might be incomplete.
Consider using the ppiper/jenkins-master docker image. This images comes with preinstalled plugins.
healthExecuteCheck testServerUrl: 'https://testserver.com'