File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 66## 🛠 Basic Set up - step by step
77
88- You should have a SonarQube server (self-hosted) OR you can use SonarCloud https://www.sonarsource.com/products/sonarcloud/
9+ - Sign in with GitHub
910- After login create SonarQube Token: In SonarQube UI → My Account → Security → Generate Token
11+ - Import your org/repository
12+ - Create a new project — choose automatic GitHub-based setup if available
1013- Add the token in GitHub repo: ➔ GitHub → Settings → Secrets and variables → Actions → New Repository Secret:
1114 - Name: SONAR_TOKEN
1215 - value: your generated token
1316- Create a file called sonar-project.properties and keep it in root of project:
1417 ``` bash
15- sonar.projectKey=your_project_key
16- sonar.host.url=https://your-sonarqube-server.com
17- sonar.login= ${SONAR_TOKEN}
18- sonar.sources=src
18+ sonar.projectKey=< YOUR_REPO_NAME >
19+ sonar.organization= < YOUR_ORG_NAME >
20+ sonar.host.url=https://sonarcloud.io
21+ sonar.sources=.
1922 sonar.language=js
2023 ```
2124 This tells SonarScanner how to scan your project.
22- - Add GitHub Action Workflow (.github/workflows/sonarqube.yml): add conetnt provided in the Repo.
25+ - Add GitHub Action Workflow (.github/workflows/sonarqube.yml): code is provided in the Repo.
2326- Note:
2427 - If you use SonarCloud, then SONAR_HOST_URL=https://sonarcloud.io
2528 - sonar-project.properties must be in the project.
You can’t perform that action at this time.
0 commit comments