https://github.com/ph1p/sonar-badges
a small docker container to enable badges with private sonarqube instances
https://github.com/ph1p/sonar-badges
Last synced: over 1 year ago
JSON representation
a small docker container to enable badges with private sonarqube instances
- Host: GitHub
- URL: https://github.com/ph1p/sonar-badges
- Owner: ph1p
- License: mit
- Created: 2020-06-15T17:58:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T14:14:28.000Z (about 6 years ago)
- Last Synced: 2025-03-30T06:34:26.279Z (over 1 year ago)
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sonarqube Badges
[](https://hub.docker.com/repository/docker/ph1p/sonar-badges)
[](https://hub.docker.com/repository/docker/ph1p/sonar-badges)
This small project offers you a way to get your sonarqube badges out of your secured sonarqube instance.
### Environment variables
Set these variables:
```bash
SERVER_URL (default: "")
<= v7.x.x
USERNAME (default: "")
PASSWORD (default: "")
>= v8.x.x
TOKEN (default: "")
```
I would recommend that you create an additional user within your instance and grant this user permissions.
##### Optional
- ENABLE_REQUEST_LOG (default: false")
- PORT (defaul: 8080)
### Howto
- download **docker-compose.yml**
- set environment variables
- run `docker-compose up -d`
- open `http://localhost:8080/KEY/METRIC.svg?branch=BRANCH`
**METRIC:** a metric key from the list down below
**KEY:** the project key inside your sonarqube instance
**BRANCH:** the analyzed branch (this is optional!)
[https://github.com/mc1arke/sonarqube-community-branch-plugin](https://github.com/mc1arke/sonarqube-community-branch-plugin)
#### Metric Types
- bugs
- code_smells
- coverage
- duplicated_lines_density
- ncloc
- sqale_rating
- alert_status
- reliability_rating
- security_rating
- sqale_index
- vulnerabilities