You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/03/01 02:00:05 UTC
[incubator-devlake-website] branch main updated: docs: sonarqube configure docs (#450)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git
The following commit(s) were added to refs/heads/main by this push:
new f0bf91d6ef docs: sonarqube configure docs (#450)
f0bf91d6ef is described below
commit f0bf91d6ef1257d8bf11c983a8b5d59d51bc2411
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Mar 1 10:00:01 2023 +0800
docs: sonarqube configure docs (#450)
* docs: sonarqube configure docs
---------
Co-authored-by: Louis.z <lo...@gmail.com>
---
docs/Configuration/AdvancedMode.md | 29 +++-
docs/Configuration/GitLab.md | 2 +-
docs/Configuration/SonarQube.md | 62 +++++++
docs/Configuration/TeamConfiguration.md | 2 +-
docs/Configuration/webhook.md | 2 +-
docs/DataModels/DevLakeDomainLayerSchema.md | 180 +++++++++++++++------
docs/Overview/SupportedDataSources.md | 173 +++++++++++---------
docs/Plugins/sonarqube.md | 56 +++++++
.../ConfigUI/sonarqube-add-data-connections.png | Bin 0 -> 76693 bytes
static/img/ConfigUI/sonarqube-set-data-scope.png | Bin 0 -> 70719 bytes
10 files changed, 376 insertions(+), 130 deletions(-)
diff --git a/docs/Configuration/AdvancedMode.md b/docs/Configuration/AdvancedMode.md
index 6377d51644..aaf51ceb74 100644
--- a/docs/Configuration/AdvancedMode.md
+++ b/docs/Configuration/AdvancedMode.md
@@ -1,6 +1,6 @@
---
title: "Blueprint Advanced Mode"
-sidebar_position: 8
+sidebar_position: 9
description: >
Using the advanced mode of Config-UI
---
@@ -304,6 +304,7 @@ You must choose at least one of `productId`, `projectId` and `executionId`.
2. Then the number in the red square above is `ExecutionId`
### 9. BitBucket
+
Below is an example for collecting a bitbucket repo.
```json
@@ -325,6 +326,32 @@ Below is an example for collecting a bitbucket repo.
- `owner`: the owner of the repository.
- `repo`: the bitbucket repository name.
+### 10. SonarQube
+
+Below is an example for collecting a SonarQube project.
+
+```json
+[
+ [
+ {
+ "plugin": "sonarqube",
+ "options": {
+ "connectionId": 1,
+ "projectKey": "testDevLake"
+ }
+ }
+ ]
+]
+```
+
+- `connectionId`: The ID of your SonarQube connection at page http://localhost:4000/connections/sonarqube.
+- `projectKey`: The project key of the SonarQube. To find the project key in SonarQube, please follow the steps:
+ - 1. Log in to the SonarQube management page.
+ - 2. Find the project for which you want to find the project key.
+ - 3. Click on the project name to enter the project homepage.
+ - 4. In the top menu bar of the project homepage, select "Project Information".
+ - 5. On the "Project Information" page, you will see the project key.
+
## Editing a Blueprint (Advanced Mode)
This section is for editing a Blueprint in the Advanced Mode. To edit in the Normal mode, please refer to [this guide](Tutorial.md#editing-a-blueprint-normal-mode).
diff --git a/docs/Configuration/GitLab.md b/docs/Configuration/GitLab.md
index 69558b2974..3f45b6d9d3 100644
--- a/docs/Configuration/GitLab.md
+++ b/docs/Configuration/GitLab.md
@@ -62,7 +62,7 @@ Click `Test Connection`, if the connection is successful, click `Save Connection
#### Projects
-Choose the Gitlab projects to collect. Limited by GitLab API, You need to type more than 2 characters to search.
+Choose the GitLab projects to collect. Limited by GitLab API, You need to type more than 2 characters to search.
- If you want to collect public repositories in GitLab, please uncheck "Only search my repositories" to search all repositories.
diff --git a/docs/Configuration/SonarQube.md b/docs/Configuration/SonarQube.md
new file mode 100644
index 0000000000..69f6c1e6ef
--- /dev/null
+++ b/docs/Configuration/SonarQube.md
@@ -0,0 +1,62 @@
+---
+title: "SonarQube"
+sidebar_position: 7
+description: Config UI instruction for SonarQube
+---
+
+Visit config-ui: `http://localhost:4000`.
+
+### Step 1 - Add Data Connections
+
+
+
+#### Connection Name
+
+Name your connection.
+
+#### Endpoint URL
+
+This should be a valid REST API endpoint
+
+- `https://YOUR_DOMAIN:YOUR_PORT/api/`
+
+The endpoint url should end with `/`.
+
+#### Auth Token(s)
+
+SonarQube personal access tokens are required to add a connection. Learn about [how to create a SonarQube personal access token](https://sonarqube.inria.fr/sonarqube/documentation/user-guide/user-token/).
+
+#### Proxy URL (Optional)
+
+If you are behind a corporate firewall or VPN you may need to utilize a proxy server. Enter a valid proxy server address on your network, e.g. `http://your-proxy-server.com:1080`
+
+#### Fixed Rate Limit (Optional)
+
+DevLake uses a dynamic rate limit at around 18,000 requests/hour to collect SonarQube data. You can adjust the rate limit if you want to increase or lower the speed.
+
+#### Test and Save Connection
+
+Click `Test Connection`, if the connection is successful, click `Save Connection` to add the connection.
+
+### Step 2 - Setting Data Scope
+
+
+
+#### Projects
+
+Choose the SonarQube projects to collect.
+
+#### Data Entities
+
+Usually, you don't have to modify this part. However, if you don't want to collect certain SonarQube entities, you can unselect some entities to accerlerate the collection speed.
+
+- Code Quality Domain: SonarQube issues, issue code blocks, file metrics, hotspots, etc.
+- Cross Domain: SonarQube accounts, etc.
+
+### Step 3 - Setting Sync Frequency
+
+You can choose how often you would like to sync your data in this step by selecting a sync frequency option or enter a cron code to specify your prefered schedule.
+
+## Troubleshooting
+
+If you run into any problem, please check the [Troubleshooting](/Troubleshooting/Configuration.md) or [create an issue](https://github.com/apache/incubator-devlake/issues)
diff --git a/docs/Configuration/TeamConfiguration.md b/docs/Configuration/TeamConfiguration.md
index 8457fd76a0..0df678875d 100644
--- a/docs/Configuration/TeamConfiguration.md
+++ b/docs/Configuration/TeamConfiguration.md
@@ -1,6 +1,6 @@
---
title: "Team Configuration"
-sidebar_position: 9
+sidebar_position: 10
description: >
Team Configuration
---
diff --git a/docs/Configuration/webhook.md b/docs/Configuration/webhook.md
index 97540285bb..16f681fdd6 100644
--- a/docs/Configuration/webhook.md
+++ b/docs/Configuration/webhook.md
@@ -1,6 +1,6 @@
---
title: "Incoming Webhook"
-sidebar_position: 7
+sidebar_position: 8
description: Config UI instruction for Webhook
---
diff --git a/docs/DataModels/DevLakeDomainLayerSchema.md b/docs/DataModels/DevLakeDomainLayerSchema.md
index 5138b28bbb..5ebe9682b4 100644
--- a/docs/DataModels/DevLakeDomainLayerSchema.md
+++ b/docs/DataModels/DevLakeDomainLayerSchema.md
@@ -64,7 +64,7 @@ Apache DevLake provides 2 plugins:
An `issue` is the abstraction of Jira/Github/GitLab/TAPD/... issues.
| **field** | **type** | **length** | **description** [...]
-|:----------------------------|:---------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...]
+| :-------------------------- | :------- | :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...]
| `id` | varchar | 255 | An issue's `id` is composed of < plugin >:< Entity >:< PK0 >[:PK1]..." <ul><li>For Github issues, a Github issue's id is like "github:GithubIssues:< GithubIssueId >". Eg. 'github:GithubIssues:1049355647'</li> <li>For Jira issues, a Github repo's id is like "jira:JiraIssues:< JiraSourceId >:< JiraIssueId >". Eg. 'jira:JiraIssues:1:10063'. < JiraSourceId > is used to identify which jira source the issue came from, since DevLake users [...]
| `issue_key` | varchar | 255 | The key of this issue. For example, the key of this Github [issue](https://github.com/apache/incubator-devlake/issues/1145) is 1145. [...]
| `url` | varchar | 255 | The url of the issue. It's a web address in most cases. [...]
@@ -152,7 +152,7 @@ This table shows the work logged under issues. Usually, an issue has multiple wo
A `board` is an issue list or a collection of issues. It's the abstraction of a Jira board, a Jira project, a [GitHub issue list](https://github.com/apache/incubator-devlake/issues) or a GitLab issue list. This table can be used to filter issues by the boards they belong to.
| **field** | **type** | **length** | **description** | **key** |
-| :------------- | :------- | :--------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------ |
+| :------------- | :------- | :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| `id` | varchar | 255 | A board's `id` is composed of "< plugin >:< Entity >:< PK0 >[:PK1]..." <ul><li>For a Github repo's issue list, the board id is like "< github >:< GithubRepos >:< ConnectionId >:< GithubRepoId >". Eg. "github:GithubRepo:384111310"</li> <li>For a Jira Board, the id is like the board id is like "< jira >:< JiraSourceId >< JiraBoards >:< ConnectionId >:< JiraBoardsId >". Eg. "jira:1:JiraBoards:1:12"</li></ul> | PK |
| `name` | varchar | 255 | The name of the board. Note: the board name of a Github project 'apache/incubator-devlake' is 'apache/incubator-devlake', representing the [default issue list](https://github.com/apache/incubator-devlake/issues). | |
| `description` | varchar | 255 | The description of the board. | |
@@ -214,7 +214,7 @@ This table shows the relation between sprints and issues that have been added to
Information about GitHub or Gitlab repositories. A repository is always owned by a user.
| **field** | **type** | **length** | **description** | **key** |
-| :------------- | :------- | :--------- |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------------- |
+| :------------- | :------- | :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- |
| `id` | varchar | 255 | A repo's `id` is composed of "< plugin >:< Entity >:< PK0 >[:PK1]..."<br/>For example, a Github repo's id is like "< github >:< GithubRepos >:< ConnectionId >:< GithubRepoId >". Eg. 'github:GithubRepos:1:384111310' | PK |
| `name` | varchar | 255 | The name of repo. | |
| `description` | varchar | 255 | The description of repo. | |
@@ -438,19 +438,19 @@ Events of pull requests.
#### cicd_scopes
Information about Jenkins Job, GitHub Action or Gitlab CI.
+
- For GitHub: a GitHub repo is converted to a cicd_scope
- For Jenkins: a GitLab project is converted to a cicd_scope
- For GitLab: a Jenkins job is converted to a cicd_scope
-| **field** | **type** | **length** | **description** | **key** |
-| :------------- | :------- | :--------- |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------------- |
-| `id` | varchar | 255 | A cicd_scope's `id` is composed of "< plugin >:< Entity >:< PK0 >[:PK1]..."<br/>For example, a Github cicd_scope's id is like "< github >:< GithubRepos >:< ConnectionId >:< GithubRepoId >". Eg. 'github:GithubRepos:1:384111310' | PK |
-| `name` | varchar | 255 | The name of cicd_scope. | |
-| `description` | varchar | 255 | The description of cicd_scope. | |
-| `url` | varchar | 255 | The url of cicd_scope. Eg. https://github.com/apache/incubator-devlake or https://jenkins.xxx.cn/view/PROD/job/OPS_releasev2/ | |
-| `created_date` | datetime | 3 | cicd_scope creation date | |
-| `updated_date` | datetime | 3 | Date of the last data collection for this cicd_scope | |
-
+| **field** | **type** | **length** | **description** | **key** |
+| :------------- | :------- | :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
+| `id` | varchar | 255 | A cicd_scope's `id` is composed of "< plugin >:< Entity >:< PK0 >[:PK1]..."<br/>For example, a Github cicd_scope's id is like "< github >:< GithubRepos >:< ConnectionId >:< GithubRepoId >". Eg. 'github:GithubRepos:1:384111310' | PK |
+| `name` | varchar | 255 | The name of cicd_scope. | |
+| `description` | varchar | 255 | The description of cicd_scope. | |
+| `url` | varchar | 255 | The url of cicd_scope. Eg. https://github.com/apache/incubator-devlake or https://jenkins.xxx.cn/view/PROD/job/OPS_releasev2/ | |
+| `created_date` | datetime | 3 | cicd_scope creation date | |
+| `updated_date` | datetime | 3 | Date of the last data collection for this cicd_scope | |
#### cicd_pipelines
@@ -496,30 +496,118 @@ A cicd_task is a single job of ci/cd.
| `finished_date` | datetime | 3 | when did this task finish | |
| `environment` | varchar | 255 | To indicate the environment in which the task is running | |
+### Domain 5 - Code Quality
+
+The names of tables in the 'Code Quality' domain will start with a prefix cq\_
+
+#### cq_projects
+
+| **field** | **type** | **length** | **description** | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id` | varchar | 255 | This key is generated based on details from the original plugin | PK |
+| `name` | varchar | 255 | The name of the project in SonarQube | |
+| `qualifier` | varchar | 255 | The type of project. Examples include "TRK" for regular projects and "VW" for views | |
+| `visibility` | varchar | 64 | The visibility of the project. Examples include "public" and "private" | |
+| `last_analysis_date` | datatime | 3 | The date and time of the most recent analysis of the project | |
+| `commit_sha` | varchar | 128 | It represents the version number or code version identifier of a project | |
+
+#### cq_issues
+
+| **field** | **type** | **length** | **description** | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id` | varchar | 255 | This key is generated based on details from the original plugin | PK |
+| `rule` | varchar | 255 | The key of the rule that the issue is violating | |
+| `severity` | varchar | 255 | The severity level of the issue | |
+| `component` | varchar | 255 | The name of the component where the issue was found | |
+| `project_key` | varchar | 255 | The key of the project that the issue belongs to | |
+| `line` | bigint | | The line number where the issue was found | |
+| `status` | varchar | 255 | The status of the issue | |
+| `message` | longtext | | The message associated with the issue | |
+| `debt` | bigint | | The estimated time required to fix the issue | |
+| `effort` | bigint | | The effort required to fix the issue | |
+| `commit_author_email` | varchar | 255 | The email address of the author of the commit that introduced the issue | |
+| `assignee` | varchar | 255 | The person assigned to fix the issue | |
+| `hash` | varchar | 255 | A hash code for the issue | |
+| `tags` | varchar | 255 | Any tags associated with the issue | |
+| `type` | varchar | 255 | The type of the issue | |
+| `scope` | varchar | 128 | The scope of the issue | |
+| `start_line` | bigint | 255 | The starting line of the issue | |
+| `end_line` | bigint | 255 | The ending line of the issue | |
+| `start_offset` | bigint | 255 | The starting offset of the issue | |
+| `end_offset` | bigint | 255 | The ending offset of the issue | |
+| `vulnerability_probability` | varchar | 100 | The probability of the issue being a vulnerability | |
+| `security_category` | varchar | 100 | The security category of the issue | |
+| `created_date` | datetime | 3 | The time when the issue was created | |
+| `updated_date` | datetime | 3 | The time when the issue was last updated | |
+
+#### cq_issue_code_blocks
+
+| **field** | **type** | **length** | **description** | **key** |
+| :------------- | :------- | :--------- | :------------------------------------------------------------------------------------ | :------ |
+| `id` | varchar | 255 | This key is generated based on details from the original plugin | PK |
+| `issue_key` | varchar | 255 | A string that stores the key of the issue that the code block is associated with | |
+| `component` | varchar | 255 | A string that stores the name of the component that the code block is associated with | |
+| `start_line` | bigint | 255 | An integer that stores the line number where the code block starts | |
+| `end_line` | bigint | 255 | An integer that stores the line number where the code block ends | |
+| `start_offset` | bigint | 255 | An integer that stores the offset where the code block starts | |
+| `end_offset` | bigint | 255 | An integer that stores the offset where the code block ends | |
+| `msg` | longtext | | A long text field that stores the message associated with the code block | |
+
+#### cq_file_metrics
+
+| **field** | **type** | **length** | **description** | **key** |
+| :----------------------------------------- | :------- | :--------- | :-------------------------------------------------------------- | :------ |
+| `id` | varchar | 255 | This key is generated based on details from the original plugin | PK |
+| `project_key` | varchar | 255 | The key of the project that the issue belongs to | PK |
+| `file_name` | longtext | | longtext fields that store the name of the file | |
+| `file_path` | longtext | | longtext fields that store the path of the file | |
+| `file_language` | longtext | | longtext fields that store the language of the file | |
+| `code_smells` | bigint | | Code smells of this file | |
+| `sqale_index` | bigint | | Sqale index of the file | |
+| `sqale_rating` | double | | Sqale rating of the file | |
+| `bugs` | bigint | | Bugs rating of the file | |
+| `reliability_rating` | longtext | | Reliability rating of the file | |
+| `vulnerabilities` | bigint | | Vulnerabilities of the file | |
+| `security_rating` | longtext | | Security rating of the file | |
+| `security_hotspots` | bigint | | Security hotspots of the file | |
+| `security_hotspots_reviewed` | double | | Security hotspots reviewed of the file | |
+| `security_review_rating` | longtext | | Security review rating of the file | |
+| `ncloc` | bigint | | Ncloc of the file | |
+| `coverage` | double | | Ncoverage of the file | |
+| `lines_to_cover` | bigint | | Lines to cover of the file | |
+| `duplicated_lines_density` | double | | Duplicated lines density of the file | |
+| `duplicated_blocks` | bigint | | Duplicated blocks of the file | |
+| `duplicated_files` | bigint | | Duplicated files of the file | |
+| `duplicated_lines` | bigint | | Duplicated lines of the file | |
+| `effort_to_reach_maintainability_rating_a` | bigint | | Effort to reach maintainability rating a of the file | |
+| `complexity` | bigint | | Complexity of the file | |
+| `cognitive_complexity` | bigint | | Cognitive complexity of the file | |
+| `num_of_lines` | bigint | | Num of lines of the file | |
+
### Project Metric Entities
#### project_pr_metrics
-| **field** | **type** | **length** | **description** | **key** |
-| :-------- | :-------- |:-----------|:---------------------------------------------------------------------------------------| :-------- |
-| `id` | varchar | 255 | Id of PR | PK |
-| `project_name` | varchar | 100 | The project that this PR belongs to | PK |
-| `first_review_id` | longtext | | The id of the first review on this pr | |
-| `first_commit_sha` | longtext | | The sha of the first commit | |
-| `pr_coding_time` | bigint | | The time it takes from the first commit until a PR is issued | |
-| `pr_pickup_time` | bigint | | The time it takes from when a PR is issued until the first comment is added to that PR | |
-| `pr_review_time` | bigint | | The time it takes to complete a code review of a PR before it gets merged | |
-| `deployment_id` | longtext | | The id of cicd_task which deploy the commits of this PR | |
-| `pr_deploy_time` | bigint | | The time it takes from when a PR is merged to when it is deployed | |
-| `pr_cycle_time` | bigint | | The total time from the first commit to when the PR is deployed | |
+| **field** | **type** | **length** | **description** | **key** |
+| :----------------- | :------- | :--------- | :------------------------------------------------------------------------------------- | :------ |
+| `id` | varchar | 255 | Id of PR | PK |
+| `project_name` | varchar | 100 | The project that this PR belongs to | PK |
+| `first_review_id` | longtext | | The id of the first review on this pr | |
+| `first_commit_sha` | longtext | | The sha of the first commit | |
+| `pr_coding_time` | bigint | | The time it takes from the first commit until a PR is issued | |
+| `pr_pickup_time` | bigint | | The time it takes from when a PR is issued until the first comment is added to that PR | |
+| `pr_review_time` | bigint | | The time it takes to complete a code review of a PR before it gets merged | |
+| `deployment_id` | longtext | | The id of cicd_task which deploy the commits of this PR | |
+| `pr_deploy_time` | bigint | | The time it takes from when a PR is merged to when it is deployed | |
+| `pr_cycle_time` | bigint | | The total time from the first commit to when the PR is deployed | |
#### project_issue_metrics
-| **field** | **type** | **length** | **description** | **key** |
-| :-------- | :-------- |:-----------|:--------------------------------------------| :-------- |
-| `id` | varchar | 255 | Id of Issue | PK |
-| `project_name` | varchar | 100 | The project that this Issue belongs to | PK |
-| `deployment_id` | longtext | | The id of cicd_task which cause an incident | |
+| **field** | **type** | **length** | **description** | **key** |
+| :-------------- | :------- | :--------- | :------------------------------------------ | :------ |
+| `id` | varchar | 255 | Id of Issue | PK |
+| `project_name` | varchar | 100 | The project that this Issue belongs to | PK |
+| `deployment_id` | longtext | | The id of cicd_task which cause an incident | |
### Cross-Domain Entities
@@ -612,29 +700,29 @@ metrics, such as _'No. of Issue closed by contributor', 'No. of commits by contr
#### project
-| **field** | **type** | **length** | **description** | **key** |
-| ------------- | -------- | ---------- | ----------------------------- | ------- |
-| `name` | varchar | 255 | name for project | PK |
-| `description` | longtext | | description of the project | |
-| `created_at` | datetime | 3 | created time of project | |
-| `updated_at` | datetime | 3 | last updated time of project | |
+| **field** | **type** | **length** | **description** | **key** |
+| ------------- | -------- | ---------- | ---------------------------- | ------- |
+| `name` | varchar | 255 | name for project | PK |
+| `description` | longtext | | description of the project | |
+| `created_at` | datetime | 3 | created time of project | |
+| `updated_at` | datetime | 3 | last updated time of project | |
#### project_metric_settings
-| **field** | **type** | **length** | **description** | **key** |
-| --------------- | -------- | ---------- | ---------------------------------------------------------- | ------- |
-| `project_name` | varchar | 255 | name for project | PK |
-| `plugin_name` | varchar | 255 | name for plugin | PK |
-| `plugin_option` | longtext | | check if metric plugins have been enabled by the project | |
-| `enable` | tinyint | 1 | if the metric plugins is enabled | |
+| **field** | **type** | **length** | **description** | **key** |
+| --------------- | -------- | ---------- | -------------------------------------------------------- | ------- |
+| `project_name` | varchar | 255 | name for project | PK |
+| `plugin_name` | varchar | 255 | name for plugin | PK |
+| `plugin_option` | longtext | | check if metric plugins have been enabled by the project | |
+| `enable` | tinyint | 1 | if the metric plugins is enabled | |
#### project_mapping
-| **field** | **type** | **length** | **description** | **key** |
-| -------------- | -------- | ---------- | ------------------------------------------------------------- | ------- |
-| `project_name` | varchar | 255 | name for project | PK |
-| `table` | varchar | 255 | the table name of [Scope](../Overview/KeyConcepts.md#data-scope) | PK |
-| `row_id` | varchar | 255 | the row_id in the [Scope](../Overview/KeyConcepts.md#data-scope) table | PK |
+| **field** | **type** | **length** | **description** | **key** |
+| -------------- | -------- | ---------- | ---------------------------------------------------------------------- | ------- |
+| `project_name` | varchar | 255 | name for project | PK |
+| `table` | varchar | 255 | the table name of [Scope](../Overview/KeyConcepts.md#data-scope) | PK |
+| `row_id` | varchar | 255 | the row_id in the [Scope](../Overview/KeyConcepts.md#data-scope) table | PK |
<br/>
diff --git a/docs/Overview/SupportedDataSources.md b/docs/Overview/SupportedDataSources.md
index 20e6fbea3c..608ca2a6b6 100644
--- a/docs/Overview/SupportedDataSources.md
+++ b/docs/Overview/SupportedDataSources.md
@@ -9,21 +9,20 @@ sidebar_position: 5
Apache DevLake(incubating) supports the following data sources. The data from each data source is collected with one or more plugins. Detailed plugin docs can be found [here](/docs/Plugins).
-| Data Source | Domain(s) | Supported Versions | Config UI Availability | Triggered Plugins | Collection Mode |
-|------------------|-----------------------------------------------------------------------------|--------------------------------------|------------------------|-----------------------------|----------------------------------------------------------------|
-| GitHub | Source Code Management, Code Review, Issue Tracking, CI/CD (GitHub Actions) | Cloud | Available | `github`, `gitextractor` | Full Refresh |
-| GitLab | Source Code Management, Code Review, Issue Tracking, CI/CD (GitLab CI) | Cloud, Community Edition 13.x+ | Available | `gitlab`, `gitextractor` | Full Refresh, Incremental Sync(for `issues`,`MRs`) |
-| Jira | Issue Tracking | Cloud, Server 7.x+, Data Center 7.x+ | Available | `jira` | Full Refresh, Incremental Sync(for `issues` and related) |
-| Jenkins | CI/CD | 2.263.x+ | Available | `jenkins` | Full Refresh |
-| BitBucket (Beta) | Source Code Management, Code Review | Cloud | Advanced Mode Available | `bitbucket`, `gitextractor` | Full Refresh |
-| TAPD (Beta) | Issue Tracking | Cloud | Advanced Mode Available | `tapd` | Full Refresh, Incremental Sync(for `stories`, `bugs`, `tasks`) |
-| Zentao (Beta) | Issue Tracking | Cloud | Advanced Mode Available | `zentao` | Full Refresh |
-| Gitee (WIP) | Source Code Management, Code Review, Issue Tracking | Cloud | Not Available | `gitee`, `gitextractor` | Full Refresh, Incremental Sync(for `issues`,`MRs`) |
-| PagerDuty (WIP) | Issue Tracking | Cloud | Not Available | `pagerduty` | Full Refresh |
-| Feishu (WIP) | Calendar | Cloud | Not Available | `feishu` | Full Refresh |
-| AE | Source Code Management | On-prem | Not Available | `ae` | Full Refresh |
-
-
+| Data Source | Domain(s) | Supported Versions | Config UI Availability | Triggered Plugins | Collection Mode |
+| ---------------- | --------------------------------------------------------------------------- | ------------------------------------ | ----------------------- | --------------------------- | -------------------------------------------------------------- |
+| GitHub | Source Code Management, Code Review, Issue Tracking, CI/CD (GitHub Actions) | Cloud | Available | `github`, `gitextractor` | Full Refresh |
+| GitLab | Source Code Management, Code Review, Issue Tracking, CI/CD (GitLab CI) | Cloud, Community Edition 13.x+ | Available | `gitlab`, `gitextractor` | Full Refresh, Incremental Sync(for `issues`,`MRs`) |
+| Jira | Issue Tracking | Cloud, Server 7.x+, Data Center 7.x+ | Available | `jira` | Full Refresh, Incremental Sync(for `issues` and related) |
+| Jenkins | CI/CD | 2.263.x+ | Available | `jenkins` | Full Refresh |
+| BitBucket (Beta) | Source Code Management, Code Review | Cloud | Advanced Mode Available | `bitbucket`, `gitextractor` | Full Refresh |
+| TAPD (Beta) | Issue Tracking | Cloud | Advanced Mode Available | `tapd` | Full Refresh, Incremental Sync(for `stories`, `bugs`, `tasks`) |
+| Zentao (Beta) | Issue Tracking | Cloud | Advanced Mode Available | `zentao` | Full Refresh |
+| Gitee (WIP) | Source Code Management, Code Review, Issue Tracking | Cloud | Not Available | `gitee`, `gitextractor` | Full Refresh, Incremental Sync(for `issues`,`MRs`) |
+| PagerDuty (WIP) | Issue Tracking | Cloud | Not Available | `pagerduty` | Full Refresh |
+| Feishu (WIP) | Calendar | Cloud | Not Available | `feishu` | Full Refresh |
+| AE | Source Code Management | On-prem | Not Available | `ae` | Full Refresh |
+| Sonarqube | CODE QUALITY | SonarQube(Server) | Available | `sonarqube` | Full Refresh |
## Data Collection Scope By Each Plugin
@@ -31,55 +30,59 @@ This table shows the entities collected by each plugin. Domain layer entities in
✅ : Collect by default.
💪 : Collect not by default. You need to add the corresponding subtasks to collect these entities in the [advanced mode](../Configuration/AdvancedMode.md).
-| Domain Layer Entities | ae | dora | gitextractor | incoming webhook | github | gitlab | jenkins | jira | refdiff | tapd |
-| ------------------------------------------------------------------------------------------- | --- | ---- | ------------ | ---------------- | ------ | ------ | ------- | ---- | ------- | ---- |
-| [accounts](../DataModels/DevLakeDomainLayerSchema.md/#accounts) | | | | | ✅ | ✅ | | ✅ | | ✅ |
-| [board_issues](../DataModels/DevLakeDomainLayerSchema.md/#board_issues) | | | | | ✅ | ✅ | | ✅ | | ✅ |
-| [board_repos](../DataModels/DevLakeDomainLayerSchema.md/#board_repos) | | | | | ✅ | ✅ | | ✅ | | |
-| [board_sprints](../DataModels/DevLakeDomainLayerSchema.md/#board_sprints) | | | | | ✅ | | | ✅ | | ✅ |
-| [boards](../DataModels/DevLakeDomainLayerSchema.md/#boards) | | | | | ✅ | ✅ | | ✅ | | ✅ |
-| [cicd_pipeline_commits](../DataModels/DevLakeDomainLayerSchema.md/#cicd_pipeline_commits) | | ✅ | | | ✅ | ✅ | ✅ | | | |
-| [cicd_pipelines](../DataModels/DevLakeDomainLayerSchema.md/#cicd_pipelines) | | ✅ | | | ✅ | ✅ | ✅ | | | |
-| [cicd_scopes](../DataModels/DevLakeDomainLayerSchema.md/#cicd_scopes) | | ✅ | | | ✅ | ✅ | ✅ | | | |
-| [cicd_tasks](../DataModels/DevLakeDomainLayerSchema.md/#cicd_tasks) | | ✅ | | 💪 | ✅ | ✅ | ✅ | | | |
-| [commit_file_components](../DataModels/DevLakeDomainLayerSchema.md/#commit_file_components) | | | ✅ | | | | | | | |
-| [commit_files](../DataModels/DevLakeDomainLayerSchema.md/#commit_files) | | | ✅ | | | | | | | |
-| [commit_line_change](../DataModels/DevLakeDomainLayerSchema.md/#commit_line_change) | | | ✅ | | | | | | | |
-| [commit_parents](../DataModels/DevLakeDomainLayerSchema.md/#commit_parents) | | | ✅ | | | | | | | |
-| [commits](../DataModels/DevLakeDomainLayerSchema.md/#commits) | ✅ | | ✅ | | 💪 | 💪 | | | | |
-| [commits_diffs](../DataModels/DevLakeDomainLayerSchema.md/#commits_diffs) | | | | | | | | | ✅ | |
-| [components](../DataModels/DevLakeDomainLayerSchema.md/#components) | | | | | | | | | | |
-| [finished_commits_diffs](../DataModels/DevLakeDomainLayerSchema.md/#finished_commits_diffs) | | | | | | | | | | |
-| [issue_changelogs](../DataModels/DevLakeDomainLayerSchema.md/#issue_changelogs) | | | | | | | | ✅ | | ✅ |
-| [issue_comments](../DataModels/DevLakeDomainLayerSchema.md/#issue_commentswip) | | | | | ✅ | | | | | ✅ |
-| [issue_commits](../DataModels/DevLakeDomainLayerSchema.md/#issue_commits) | | | | | | | | ✅ | | ✅ |
-| [issue_labels](../DataModels/DevLakeDomainLayerSchema.md/#issue_labels) | | | | | ✅ | ✅ | | | | ✅ |
-| [issue_repo_commits](../DataModels/DevLakeDomainLayerSchema.md/#issue_repo_commits) | | | | | | | | ✅ | | |
-| [issue_worklogs](../DataModels/DevLakeDomainLayerSchema.md/#issue_worklogs) | | | | | | | | ✅ | | ✅ |
-| [issues](../DataModels/DevLakeDomainLayerSchema.md/#issues) | | | | | ✅ | | | ✅ | | ✅ |
-| [project_issue_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_issue_metrics) | | ✅ | | | ✅ | ✅ | | ✅ | | ✅ |
-| [project_mapping](../DataModels/DevLakeDomainLayerSchema.md/#project_mapping) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ |
-| [project_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_metrics) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ |
-| [project_pr_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_pr_metrics) | | ✅ | | | ✅ | ✅ | | | | ✅ |
-| [projects](../DataModels/DevLakeDomainLayerSchema.md/#project) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ |
-| [pull_request_comments](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_comments) | | | | | ✅ | ✅ | | | | |
-| [pull_request_commits](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_commits) | | | | | ✅ | ✅ | | | | |
-| [pull_request_issues](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_issues) | | | | | ✅ | | | | | |
-| [pull_request_labels](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_labels) | | | | | ✅ | ✅ | | | | |
-| [pull_requests](../DataModels/DevLakeDomainLayerSchema.md/#pull_requests) | | | | | ✅ | ✅ | | | | |
-| [ref_commits](../DataModels/DevLakeDomainLayerSchema.md/#ref_commits) | | | | | | | | | ✅ | |
-| [refs](../DataModels/DevLakeDomainLayerSchema.md/#refs) | | | ✅ | | | | | | ✅ | |
-| [refs_issues_diffs](../DataModels/DevLakeDomainLayerSchema.md/#refs_issues_diffs) | | | | | | | | | ✅ | |
-| [ref_pr_cherry_picks](../DataModels/DevLakeDomainLayerSchema.md/#ref_pr_cherry_picks) | | | | | | | | | ✅ | |
-| [repo_commits](../DataModels/DevLakeDomainLayerSchema.md/#repo_commits) | | | ✅ | | 💪 | 💪 | | | | |
-| [repo_snapshot](../DataModels/DevLakeDomainLayerSchema.md/#repo_snapshot) | | | ✅ | | | | | | | |
-| [repos](../DataModels/DevLakeDomainLayerSchema.md/#repos) | | | | | ✅ | ✅ | | | | |
-| [sprint_issues](../DataModels/DevLakeDomainLayerSchema.md/#sprint_issues) | | | | | ✅ | | | ✅ | | ✅ |
-| [sprints](../DataModels/DevLakeDomainLayerSchema.md/#sprints) | | | | | ✅ | | | ✅ | | ✅ |
-| [team_users](../DataModels/DevLakeDomainLayerSchema.md/#team_users) | | | | | | | | | | |
-| [teams](../DataModels/DevLakeDomainLayerSchema.md/#teams) | | | | | | | | | | |
-| [user_account](../DataModels/DevLakeDomainLayerSchema.md/#user_accounts) | | | | | | | | | | |
-| [users](../DataModels/DevLakeDomainLayerSchema.md/#users) | | | | | | | | ✅ | | ✅ |
+| Domain Layer Entities | ae | dora | gitextractor | incoming webhook | github | gitlab | jenkins | jira | refdiff | tapd | sonarqube |
+| ------------------------------------------------------------------------------------------- | --- | ---- | ------------ | ---------------- | ------ | ------ | ------- | ---- | ------- | ---- | --------- |
+| [accounts](../DataModels/DevLakeDomainLayerSchema.md/#accounts) | | | | | ✅ | ✅ | | ✅ | | ✅ | ✅ |
+| [board_issues](../DataModels/DevLakeDomainLayerSchema.md/#board_issues) | | | | | ✅ | ✅ | | ✅ | | ✅ | |
+| [board_repos](../DataModels/DevLakeDomainLayerSchema.md/#board_repos) | | | | | ✅ | ✅ | | ✅ | | | |
+| [board_sprints](../DataModels/DevLakeDomainLayerSchema.md/#board_sprints) | | | | | ✅ | | | ✅ | | ✅ | |
+| [boards](../DataModels/DevLakeDomainLayerSchema.md/#boards) | | | | | ✅ | ✅ | | ✅ | | ✅ | |
+| [cicd_pipeline_commits](../DataModels/DevLakeDomainLayerSchema.md/#cicd_pipeline_commits) | | ✅ | | | ✅ | ✅ | ✅ | | | | |
+| [cicd_pipelines](../DataModels/DevLakeDomainLayerSchema.md/#cicd_pipelines) | | ✅ | | | ✅ | ✅ | ✅ | | | | |
+| [cicd_scopes](../DataModels/DevLakeDomainLayerSchema.md/#cicd_scopes) | | ✅ | | | ✅ | ✅ | ✅ | | | | |
+| [cicd_tasks](../DataModels/DevLakeDomainLayerSchema.md/#cicd_tasks) | | ✅ | | 💪 | ✅ | ✅ | ✅ | | | | |
+| [commit_file_components](../DataModels/DevLakeDomainLayerSchema.md/#commit_file_components) | | | ✅ | | | | | | | | |
+| [commit_files](../DataModels/DevLakeDomainLayerSchema.md/#commit_files) | | | ✅ | | | | | | | | |
+| [commit_line_change](../DataModels/DevLakeDomainLayerSchema.md/#commit_line_change) | | | ✅ | | | | | | | | |
+| [commit_parents](../DataModels/DevLakeDomainLayerSchema.md/#commit_parents) | | | ✅ | | | | | | | | |
+| [commits](../DataModels/DevLakeDomainLayerSchema.md/#commits) | ✅ | | ✅ | | 💪 | 💪 | | | | | |
+| [commits_diffs](../DataModels/DevLakeDomainLayerSchema.md/#commits_diffs) | | | | | | | | | ✅ | | |
+| [components](../DataModels/DevLakeDomainLayerSchema.md/#components) | | | | | | | | | | | |
+| [finished_commits_diffs](../DataModels/DevLakeDomainLayerSchema.md/#finished_commits_diffs) | | | | | | | | | | | |
+| [issue_changelogs](../DataModels/DevLakeDomainLayerSchema.md/#issue_changelogs) | | | | | | | | ✅ | | ✅ | |
+| [issue_comments](../DataModels/DevLakeDomainLayerSchema.md/#issue_commentswip) | | | | | ✅ | | | | | ✅ | |
+| [issue_commits](../DataModels/DevLakeDomainLayerSchema.md/#issue_commits) | | | | | | | | ✅ | | ✅ | |
+| [issue_labels](../DataModels/DevLakeDomainLayerSchema.md/#issue_labels) | | | | | ✅ | ✅ | | | | ✅ | |
+| [issue_repo_commits](../DataModels/DevLakeDomainLayerSchema.md/#issue_repo_commits) | | | | | | | | ✅ | | | |
+| [issue_worklogs](../DataModels/DevLakeDomainLayerSchema.md/#issue_worklogs) | | | | | | | | ✅ | | ✅ | |
+| [issues](../DataModels/DevLakeDomainLayerSchema.md/#issues) | | | | | ✅ | | | ✅ | | ✅ | |
+| [project_issue_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_issue_metrics) | | ✅ | | | ✅ | ✅ | | ✅ | | ✅ | |
+| [project_mapping](../DataModels/DevLakeDomainLayerSchema.md/#project_mapping) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ | |
+| [project_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_metrics) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ | |
+| [project_pr_metrics](../DataModels/DevLakeDomainLayerSchema.md/#project_pr_metrics) | | ✅ | | | ✅ | ✅ | | | | ✅ | |
+| [projects](../DataModels/DevLakeDomainLayerSchema.md/#project) | | ✅ | | | ✅ | ✅ | ✅ | ✅ | | ✅ | |
+| [pull_request_comments](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_comments) | | | | | ✅ | ✅ | | | | | |
+| [pull_request_commits](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_commits) | | | | | ✅ | ✅ | | | | | |
+| [pull_request_issues](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_issues) | | | | | ✅ | | | | | | |
+| [pull_request_labels](../DataModels/DevLakeDomainLayerSchema.md/#pull_request_labels) | | | | | ✅ | ✅ | | | | | |
+| [pull_requests](../DataModels/DevLakeDomainLayerSchema.md/#pull_requests) | | | | | ✅ | ✅ | | | | | |
+| [ref_commits](../DataModels/DevLakeDomainLayerSchema.md/#ref_commits) | | | | | | | | | ✅ | | |
+| [refs](../DataModels/DevLakeDomainLayerSchema.md/#refs) | | | ✅ | | | | | | ✅ | | |
+| [refs_issues_diffs](../DataModels/DevLakeDomainLayerSchema.md/#refs_issues_diffs) | | | | | | | | | ✅ | | |
+| [ref_pr_cherry_picks](../DataModels/DevLakeDomainLayerSchema.md/#ref_pr_cherry_picks) | | | | | | | | | ✅ | | |
+| [repo_commits](../DataModels/DevLakeDomainLayerSchema.md/#repo_commits) | | | ✅ | | 💪 | 💪 | | | | | |
+| [repo_snapshot](../DataModels/DevLakeDomainLayerSchema.md/#repo_snapshot) | | | ✅ | | | | | | | | |
+| [repos](../DataModels/DevLakeDomainLayerSchema.md/#repos) | | | | | ✅ | ✅ | | | | | |
+| [sprint_issues](../DataModels/DevLakeDomainLayerSchema.md/#sprint_issues) | | | | | ✅ | | | ✅ | | ✅ | |
+| [sprints](../DataModels/DevLakeDomainLayerSchema.md/#sprints) | | | | | ✅ | | | ✅ | | ✅ | |
+| [team_users](../DataModels/DevLakeDomainLayerSchema.md/#team_users) | | | | | | | | | | | |
+| [teams](../DataModels/DevLakeDomainLayerSchema.md/#teams) | | | | | | | | | | | |
+| [user_account](../DataModels/DevLakeDomainLayerSchema.md/#user_accounts) | | | | | | | | | | | |
+| [users](../DataModels/DevLakeDomainLayerSchema.md/#users) | | | | | | | | ✅ | | ✅ | |
+| [cq_projects](../DataModels/DevLakeDomainLayerSchema.md/#cq_projects) | | | | | | | | ✅ | | ✅ | ✅ |
+| [cq_issues](../DataModels/DevLakeDomainLayerSchema.md/#cq_issues) | | | | | | | | ✅ | | ✅ | ✅ |
+| [cq_issue_code_blocks](../DataModels/DevLakeDomainLayerSchema.md/#cq_issue_code_blocks) | | | | | | | | ✅ | | ✅ | ✅ |
+| [cq_file_metrics](../DataModels/DevLakeDomainLayerSchema.md/#cq_file_metrics) | | | | | | | | ✅ | | ✅ | ✅ |
## Data Sync Policy
@@ -125,24 +128,24 @@ This table shows the entities collected by each plugin. Domain layer entities in
| Subtask Name | Estimated Max Number of Request | Does It support Incremental Collection? | Does It Support Time Filter? |
| ---------------------------------- | ----------------------------------- | --------------------------------------- | ---------------------------- |
| --------------------------------- | Common | ----------------------- | |
-| CollectMilestonesMeta | ≈10 | ✅ | ❌ |
-| CollectRunsMeta | <10^4 | ✅ | ✅ |
-| CollectApiCommentsMeta | 400 (max page that GitHub supports) | ✅ | ✅ |
-| **CollectApiEventsMeta** | 400 (max page that GitHub supports) | ❌ | ❌ |
-| CollectApiPullRequestReviewsMeta | <10^5 | ✅ | ✅ |
+| CollectMilestonesMeta | ≈10 | ✅ | ❌ |
+| CollectRunsMeta | <10^4 | ✅ | ✅ |
+| CollectApiCommentsMeta | 400 (max page that GitHub supports) | ✅ | ✅ |
+| **CollectApiEventsMeta** | 400 (max page that GitHub supports) | ❌ | ❌ |
+| CollectApiPullRequestReviewsMeta | <10^5 | ✅ | ✅ |
| --------------------------------- | Graphql Only (Default) | ----------------------- | |
-| CollectIssueMeta | ≈10^4 | ❌ | ✅ |
-| CollectPrMeta | ≈10^3 | ❌ | ✅ |
-| CollectCheckRunMeta | <10^4 | ❌ | ✅ |
-| CollectAccountMeta | ≈10^2 | ❌ | - |
+| CollectIssueMeta | ≈10^4 | ❌ | ✅ |
+| CollectPrMeta | ≈10^3 | ❌ | ✅ |
+| CollectCheckRunMeta | <10^4 | ❌ | ✅ |
+| CollectAccountMeta | ≈10^2 | ❌ | - |
| --------------------------------- | Restful Only (Not by Default) | ----------------------- | |
-| CollectApiIssuesMeta | ≈10^4 | ✅ | ❌ |
-| CollectApiPullRequestsMeta | ≈10^2 | ❌ | ❌ |
-| CollectApiPullRequestCommitsMeta | ≈10^4 | ✅ | ✅ |
-| **CollectApiPrReviewCommentsMeta** | ≈10^4 | ✅ | ✅ |
-| **CollectAccountsMeta** | ≈10^4 | ❌ | ❌ |
-| **CollectAccountOrgMeta** | ≈10^4 | ❌ | ❌ |
-| CollectJobsMeta | <10^6 | ❌ | ✅ |
+| CollectApiIssuesMeta | ≈10^4 | ✅ | ❌ |
+| CollectApiPullRequestsMeta | ≈10^2 | ❌ | ❌ |
+| CollectApiPullRequestCommitsMeta | ≈10^4 | ✅ | ✅ |
+| **CollectApiPrReviewCommentsMeta** | ≈10^4 | ✅ | ✅ |
+| **CollectAccountsMeta** | ≈10^4 | ❌ | ❌ |
+| **CollectAccountOrgMeta** | ≈10^4 | ❌ | ❌ |
+| CollectJobsMeta | <10^6 | ❌ | ✅ |
| CollectApiCommitsMeta | Not enabled | - | - |
| CollectApiCommitStatsMeta | Not enabled | - | - |
@@ -177,3 +180,13 @@ This table shows the entities collected by each plugin. Domain layer entities in
| **CollectApiPullRequestCommitsMeta** | ≈10^5 | ❌ | ❌ |
| **CollectApiPullRequestReviewsMeta** | ≈10^5 | ❌ | ❌ |
| **\*CollectApiCommitStatsMeta\*** | ≈10^6 (Not enable) | ❌ | ❌ |
+
+### SonarQube
+
+| Subtask Name | Estimated Max Number of Request | Does It support Incremental Collection? | Does It Support Time Filter? |
+| ---------------------------- | ------------------------------- | --------------------------------------- | ---------------------------- |
+| CollectAccounts | <10^4 | ❌ | ❌ |
+| CollectIssues | <10^4 | ❌ | ❌ |
+| CollectHotspots | <10^4 | ❌ | ❌ |
+| CollectFilemetrics | <10^4 | ❌ | ❌ |
+| CollectAdditionalFilemetrics | <10^4 | ❌ | ❌ |
diff --git a/docs/Plugins/sonarqube.md b/docs/Plugins/sonarqube.md
new file mode 100644
index 0000000000..811b039135
--- /dev/null
+++ b/docs/Plugins/sonarqube.md
@@ -0,0 +1,56 @@
+---
+title: "SonarQube"
+description: >
+ SonarQube Plugin
+---
+
+## Summary
+
+This plugin collects SonarQube data through its REST APIs. SonarQube is a tool for static code analysis and code quality management. It can help you discover potential problems and defects in your code, and provide suggestions and solutions.
+
+## Entities
+
+Check out the [SonarQube entities](/Overview/SupportedDataSources.md#data-collection-scope-by-each-plugin) collected by this plugin.
+
+## Data Refresh Policy
+
+Check out the [data refresh policy](/Overview/SupportedDataSources.md#sonarqube) of this plugin.
+
+## Metrics
+
+Most of SonarQube metrics are collected and can be found in DevLake's SonarQube dashboard.
+
+## Configuration
+
+- Configuring SonarQube via [config-ui](/Configuration/SonarQube.md).
+- Configuring SonarQube via Config UI's [advanced mode](/Configuration/AdvancedMode.md#10-sonarqube).
+
+## API Sample Request
+
+You can trigger data collection by making a POST request to `/pipelines`.
+
+```
+curl 'http://localhost:8080/pipelines' \
+--header 'Content-Type: application/json' \
+--data-raw '
+{
+ "name": "project1-BLUEPRINT",
+ "blueprintId": 1,
+ "plan": [
+ [
+ {
+ "plugin": "sonarqube",
+ "options": {
+ "connectionId": 1,
+ "projectKey": "testDevLake"
+ }
+ }
+ ]
+ ]
+}
+'
+```
+
+## References
+
+- [references](/DeveloperManuals/DeveloperSetup.md#references)
diff --git a/static/img/ConfigUI/sonarqube-add-data-connections.png b/static/img/ConfigUI/sonarqube-add-data-connections.png
new file mode 100644
index 0000000000..544f6bc26a
Binary files /dev/null and b/static/img/ConfigUI/sonarqube-add-data-connections.png differ
diff --git a/static/img/ConfigUI/sonarqube-set-data-scope.png b/static/img/ConfigUI/sonarqube-set-data-scope.png
new file mode 100644
index 0000000000..a828fd369b
Binary files /dev/null and b/static/img/ConfigUI/sonarqube-set-data-scope.png differ