badge-generator
is a reactive SVG badge generator able to produce both static badges and dynamically rendered quality/coverage badges from a private Sonar server.
You must include the following properties in the application.yml file:
sonar:
username: user
password: password
uri: https://definitely-my-sonar-server.com
Run the badge-generator
with mvnw spring-boot:run
.
Once the application is up and running, you can query the APIs specified in the openapi.yaml specification file in order to generate static/dynamic badges.
http://localhost:8080/badges/my-message?label=my-label&labelColor=GREY&messageColor=BLUE
http://localhost:8080/badges/quality/sonarProjectKey
http://localhost:8080/badges/coverage/sonarProjectKey
Run the Unit Tests with mvnw verify
.
Run all tests, including Integration Tests, with mvnw verify -PtestIT
.
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring cache abstraction
The following guides illustrate how to use some features concretely: