sonarqube
parent
21c08d9a5e
commit
27bd1e986c
@ -0,0 +1,54 @@
|
||||
# SonarQube
|
||||
|
||||
[Reference](https://docs.sonarqube.org/latest/setup/get-started-2-minutes/)
|
||||
|
||||
Docker
|
||||
|
||||
```sh
|
||||
$ docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest
|
||||
|
||||
```
|
||||
|
||||
docker-compose.yml
|
||||
|
||||
```yaml
|
||||
# Use admin/admin as user/password credentials
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
sonarqube:
|
||||
image: 'sonarqube:latest'
|
||||
environment:
|
||||
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
|
||||
#restart: always
|
||||
ports:
|
||||
- "9000:9000"
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Run docker compose
|
||||
|
||||
```sh
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
Browse [localhost](http://localhost:9000)
|
||||
|
||||
Credential
|
||||
|
||||
* Login : admin
|
||||
|
||||
* Password : admin
|
||||
|
||||
## Create Project
|
||||
|
||||
Now that you're logged in to your local SonarQube instance, let's analyze a project:
|
||||
|
||||
1. Click the **Create new project** button.
|
||||
2. Give your project a **Project key** and a **Display name** and click the **Set Up** button.
|
||||
3. Under **Provide a token**, select **Generate a token**. Give your token a name, click the **Generate** button, and click **Continue**.
|
||||
4. Select your project's main language under **Run analysis on your project**, and follow the instructions to analyze your project. Here you'll download and execute a Scanner on your code (if you're using Maven or Gradle, the Scanner is automatically downloaded).
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# Use admin/admin as user/password credentials
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
sonarqube:
|
||||
image: 'sonarqube:9.5-community'
|
||||
environment:
|
||||
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
|
||||
#restart: always
|
||||
ports:
|
||||
- "9000:9000"
|
||||
Loading…
Reference in New Issue