This is an automated email from the ASF dual-hosted git repository.

zky 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 747bacde7 docs: update the advanced mode plugin docs (#374)
747bacde7 is described below

commit 747bacde7ad5e1e5b2a220de1ac9b0cb30c3d720
Author: abeizn <[email protected]>
AuthorDate: Fri Jan 6 15:31:00 2023 +0800

    docs: update the advanced mode plugin docs (#374)
    
    * docs: update the advanced mode plugin docs
    
    * docs: update the advanced mode plugin docs
    
    * docs: update the advanced mode plugin docs
---
 docs/Plugins/github.md                    |  41 ++++-
 docs/Plugins/gitlab.md                    |   3 +-
 docs/Plugins/jenkins.md                   |  29 ++++
 docs/Plugins/jira.md                      |   5 +-
 docs/Plugins/tapd.md                      |   5 +-
 docs/Plugins/zentao.md                    |   4 +-
 docs/UserManuals/ConfigUI/AdvancedMode.md | 266 ++++++++++++++++++++----------
 7 files changed, 260 insertions(+), 93 deletions(-)

diff --git a/docs/Plugins/github.md b/docs/Plugins/github.md
index 5d3dbd69a..f8874548f 100644
--- a/docs/Plugins/github.md
+++ b/docs/Plugins/github.md
@@ -57,8 +57,7 @@ Metrics that can be calculated based on the data collected 
from GitHub:
 ## Configuration
 
 - Configuring GitHub via [Config UI](/UserManuals/ConfigUI/GitHub.md)
-- Configuring GitHub via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#2-github).
-
+- Configuring GitHub via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#1-github).
 
 ## API Sample Request
 
@@ -99,6 +98,44 @@ curl 'http://localhost:8080/pipelines' \
 '
 ```
 
+or
+
+```
+curl 'http://localhost:8080/pipelines' \
+--header 'Content-Type: application/json' \
+--data-raw '
+{
+  "name": "project1-BLUEPRINT",
+  "blueprintId": 1,
+  "plan": [
+    [
+      {
+        "plugin": "github",
+        "options": {
+          "connectionId": 1,
+          "owner": "apache",
+          "repo": "incubator-devlake",
+          "transformationRules":{
+            "deploymentPattern":"",
+            "productionPattern":"",
+            "issueComponent":"",
+            "issuePriority":"(high|medium|low)$",
+            "issueSeverity":"",
+            "issueTypeBug":"(bug)$",
+            "issueTypeIncident":"",
+            "issueTypeRequirement":"(feature|feature-request)$",
+            "prBodyClosePattern":"",
+            "prComponent":"",
+            "prType":""
+          }
+        }
+      }
+    ]
+  ]
+}
+'
+```
+
 ## References
 
 - [references](/DeveloperManuals/DeveloperSetup.md#references)
diff --git a/docs/Plugins/gitlab.md b/docs/Plugins/gitlab.md
index 581f4cd29..f4b5663b7 100644
--- a/docs/Plugins/gitlab.md
+++ b/docs/Plugins/gitlab.md
@@ -50,8 +50,7 @@ Metrics that can be calculated based on the data collected 
from GitLab:
 ## Configuration
 
 - Configuring GitLab via [config-ui](/UserManuals/ConfigUI/GitLab.md).
-- Configuring GitLab via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#1-gitlab).
-
+- Configuring GitLab via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#2-gitlab).
 
 ## API Sample Request
 
diff --git a/docs/Plugins/jenkins.md b/docs/Plugins/jenkins.md
index 20125c60a..13ab30273 100644
--- a/docs/Plugins/jenkins.md
+++ b/docs/Plugins/jenkins.md
@@ -35,6 +35,7 @@ Metrics that can be calculated based on the data collected 
from Jenkins:
 ## Configuration
 
 - Configuring Jenkins via [Config UI](/UserManuals/ConfigUI/Jenkins.md)
+- Configuring Jenkins via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#3-jenkins).
 
 ## API Sample Request
 
@@ -66,6 +67,34 @@ curl 'http://localhost:8080/pipelines' \
 '
 ```
 
+or
+
+```
+curl 'http://localhost:8080/pipelines' \
+--header 'Content-Type: application/json' \
+--data-raw '
+{
+  "name": "project1-BLUEPRINT",
+  "blueprintId": 2,
+  "plan": [
+    [
+      {
+        "plugin": "jenkins",
+        "options": {
+          "connectionId": 1,
+          "jobFullName": "auto_deploy",
+          "transformationRules":{
+            "deploymentPattern":"",
+            "productionPattern":""
+          }
+        }
+      }
+    ]
+  ]
+}
+'
+```
+
 ## References
 
 - [references](/DeveloperManuals/DeveloperSetup.md#references)
diff --git a/docs/Plugins/jira.md b/docs/Plugins/jira.md
index 1facdb297..ea2ef56d7 100644
--- a/docs/Plugins/jira.md
+++ b/docs/Plugins/jira.md
@@ -4,7 +4,6 @@ description: >
   Jira Plugin
 ---
 
-
 ## Summary
 
 This plugin collects Jira data through Jira REST API. It then computes and 
visualizes various engineering metrics from the Jira data.
@@ -31,14 +30,14 @@ Metrics that can be calculated based on the data collected 
from Jira:
 - [Incident Count per 1k Lines of 
Code](/Metrics/IncidentCountPer1kLinesOfCode.md)
 
 ## Configuration
+
 - Configuring Jira via [config-ui](/UserManuals/ConfigUI/Jira.md).
-- Configuring Jira via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#5-jira).
+- Configuring Jira via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#4-jira).
 
 ## API Sample Request
 
 You can trigger data collection by making a POST request to `/pipelines`.
 
-
 ```shell
 curl 'http://localhost:8080/pipelines' \
 --header 'Content-Type: application/json' \
diff --git a/docs/Plugins/tapd.md b/docs/Plugins/tapd.md
index 332b91115..05c2f1846 100644
--- a/docs/Plugins/tapd.md
+++ b/docs/Plugins/tapd.md
@@ -5,6 +5,7 @@ description: >
 ---
 
 ## Summary
+
 This plugin collects TAPD data through its REST APIs. TAPD is an 
issue-tracking tool similar to Jira.
 
 ## Metrics
@@ -18,6 +19,6 @@ Metrics that can be calculated based on the data collected 
from Tapd:
 - [Incident Age](/Metrics/IncidentAge.md)
 
 ## Configuration
-- Configuring Tapd via [config-ui](/UserManuals/ConfigUI/Tapd.md).
-- Configuring Tapd via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#4-tapd).
 
+- Configuring Tapd via [config-ui](/UserManuals/ConfigUI/Tapd.md).
+- Configuring Tapd via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#6-tapd).
diff --git a/docs/Plugins/zentao.md b/docs/Plugins/zentao.md
index 5e1619ad9..9102e608d 100644
--- a/docs/Plugins/zentao.md
+++ b/docs/Plugins/zentao.md
@@ -5,6 +5,7 @@ description: >
 ---
 
 ## Summary
+
 This plugin collects Zentao data through its REST APIs. 
[Zentao](https://github.com/easysoft/zentaopms) is an issue-tracking tool 
similar to Jira.
 
 ## Metrics
@@ -18,5 +19,6 @@ Metrics that can be calculated based on the data collected 
from Zentao:
 - [Incident Age](/Metrics/IncidentAge.md)
 
 ## Configuration
+
 - Configuring Zentao via [config-ui](/UserManuals/ConfigUI/Zentao.md).
-- Configuring Zentao via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#3-zentao).
+- Configuring Zentao via Config UI's [advanced 
mode](/UserManuals/ConfigUI/AdvancedMode.md#8-zentao).
diff --git a/docs/UserManuals/ConfigUI/AdvancedMode.md 
b/docs/UserManuals/ConfigUI/AdvancedMode.md
index d5afa87ec..396286d7b 100644
--- a/docs/UserManuals/ConfigUI/AdvancedMode.md
+++ b/docs/UserManuals/ConfigUI/AdvancedMode.md
@@ -33,7 +33,41 @@ Advanced mode gives utmost flexibility to users by exposing 
the JSON API.
 
 ## Examples
 
-### 1. Gitlab
+### 1. GitHub
+
+Collect multiple GitHub repos sequentially. Below is an example for collecting 
2 GitHub repos sequentially. It has 2 stages, each contains a GitHub task.
+
+```
+[
+  [
+    {
+      "Plugin": "github",
+      "Options": {
+        "connectionId": 1,
+        "repo": "incubator-devlake",
+        "owner": "apache"
+      }
+    },
+    {
+      "Plugin": "github",
+      "Options": {
+        "connectionId": 1,
+        "repo": "lake",
+        "owner": "merico-dev"
+      }
+    }
+  ]
+]
+```
+
+GitHub:
+
+- `connectionId`: The ID of your GitHub connection at page 
http://localhost:4000/connections/github.
+- `owner`: Just take a look at the URL: 
https://github.com/apache/incubator-devlake, owner is `apache`.
+- `repo`: Just take a look at the URL: 
https://github.com/apache/incubator-devlake, repo is `incubator-devlake`.
+
+### 2. GitLab
+
 Collect multiple GitLab repos sequentially.
 
 > When there're multiple collection tasks against a single data source, we 
 > recommend running these tasks sequentially since the collection speed is 
 > mostly limited by the API rate limit of the data source.
@@ -47,7 +81,8 @@ Below is an example for collecting 2 GitLab repos 
sequentially. It has 2 stages,
     {
       "Plugin": "gitlab",
       "Options": {
-        "projectId": 15238074
+        "connectionId": 1,
+        "projectId": 152***74
       }
     }
   ],
@@ -55,84 +90,108 @@ Below is an example for collecting 2 GitLab repos 
sequentially. It has 2 stages,
     {
       "Plugin": "gitlab",
       "Options": {
-        "projectId": 11624398
+        "connectionId": 2,
+        "projectId": 116***98
       }
     }
   ]
 ]
 ```
 
-### 2. Github
-Collect a GitHub repo and a Jira board in parallel
+- `connectionId`: The ID of your GitLab connection at page 
http://localhost:4000/connections/gitlab.
+- `projectId`: GitLab repo's Project ID.
+
+### 3. Jenkins
 
-Below is an example for collecting a GitHub repo and a Jira board in parallel. 
It has a single stage with a GitHub task and a Jira task. Since users can 
configure multiple Jira connection, it's required to pass in a `connectionId` 
for Jira task to specify which connection to use.
+Collect multiple Jenkins jobs sequentially. Below is an example for collecting 
2 Jenkins jobs sequentially. It has 2 stages, each contains a Jenkins task.
 
 ```
 [
-  [
-    {
-      "Plugin": "github",
-      "Options": {
-        "repo": "lake",
-        "owner": "merico-dev"
-      }
-    },
-    {
-      "Plugin": "jira",
-      "Options": {
-        "connectionId": 1,
-        "boardId": 76
-      }
-    }
-  ]
+    [
+        {
+            "plugin": "jenkins",
+            "options": {
+                "connectionId": 1,
+                "scopeId": "auto_deploy"
+            }
+        }
+    ],
+    [
+        {
+            "plugin": "jenkins",
+            "options": {
+                "connectionId": 2,
+                "scopeId": "Deploy test"
+            }
+        }
+    ]
 ]
 ```
 
-### 3. Zentao
-Below is an example for collecting a Zentao workspace. Since users can 
configure multiple Zentao connection, it's required to pass in a `connectionId` 
for Tapd task to specify which connection to use.
+- `connectionId`: The ID of your Jenkins connection at page 
http://localhost:4000/connections/jenkins.
+- `scopeId`: Jenkins job name.
+
+### 4. Jira
+
+Collect multiple Jira boards sequentially. Below is an example for collecting 
2 Jira boards sequentially. It has 2 stages, each contains a Jira task.
 
 ```
 [
-  [
-    {
-      plugin: 'zentao',
-      options: {
-        connectionId: 1,
-        productId: 1,
-        projectId: 1,
-        executionId: 1
-      }
-    }
-  ]
+    [
+        {
+            "plugin": "jira",
+            "options": {
+                "boardId": 8,
+                "connectionId": 1
+            }
+        }
+    ],
+    [
+        {
+            "plugin": "jira",
+            "options": {
+                "boardId": 26,
+                "connectionId": 1
+            }
+        }
+    ]
 ]
 ```
 
-- `connectionId`: The `ID` field from **ZENTAO Integration** page.
-- `productId`: optional, ZENTAO product id, see "Find Product Id" for details.
-- `projectId`: optional, ZENTAO product id, see "Find Project Id" for details.
-- `executionId`: optional, ZENTAO product id, see "Find Execution Id" for 
details.
+- `connectionId`: The ID of your Jira connection at page 
http://localhost:4000/connections/jira.
+- `boardId`: Just take a look at the URL - it will be the last number in the 
address. Should look something like this at the end: 
`RapidBoard.jspa?rapidView=8` or `/projects/xxx/boards/8`. So `8` would be the 
board ID in that case.
 
-You must choose at least one of `productId`, `projectId` and `executionId`.
+### 5. Jira + GitLab
 
-#### Find Product Id
-1. Navigate to the Zentao Product in the browser
-   ![](zentao-product.png)
-2. Click the red square annotated in the pic above
-   ![](zentao-product-id.png)
-3. Then the number in the red circle above is `ProductId`
+Below is an example for collecting a GitLab repo and a Jira board in parallel. 
It has a single stage with a GitLab task and a Jira task. As GitLab and Jira 
are using their own tokens, they can be executed in parallel.
 
-#### Find Project Id
-1. Navigate to the Zentao Project in the browser
-   ![](zentao-project-id.png)
-2. Then the number in the red square above is `ProjectId`
+```
+[
+    [
+        {
+            "plugin":"jira",
+            "options":{
+                "boardId":8,
+                "connectionId":1
+            }
+        }
+    ],
+    [
+        {
+            "Plugin":"gitlab",
+            "Options":{
+                "connectionId":1,
+                "projectId":116***98
+            }
+        }
+    ]
+]
+```
 
-#### Find Execution Id
-1. Navigate to the Zentao Execution in the browser
-   ![](zentao-execution-id.png)
-2. Then the number in the red square above is `ExecutionId`
+### 6. TAPD
+
+Below is an example for collecting a TAPD workspace. Since users can configure 
multiple TAPD connection, it's required to pass in a `connectionId` for TAPD 
task to specify which connection to use.
 
-### 4. Tapd
-Below is an example for collecting a Tapd workspace. Since users can configure 
multiple Tapd connection, it's required to pass in a `connectionId` for Tapd 
task to specify which connection to use.
 ```
 [
     [
@@ -156,58 +215,99 @@ Below is an example for collecting a Tapd workspace. 
Since users can configure m
 ]
 ```
 
-- `connectionId`: The `ID` field from **TAPD Integration** page.
+- `connectionId`: The ID of your TAPD connection at page 
http://localhost:4000/connections/tapd.
 - `workspaceId`: TAPD workspace id, you can get it from two ways:
   - url: ![tapd-workspace-id](/img/ConfigUI/tapd-find-workspace-id.png)
-  - db: you can check workspace info from db._tool_tapd_workspaces and get all 
workspaceId you want to collect after execution of the following json in 
`advanced mode`
+  - db: you can check workspace info from db.\_tool_tapd_workspaces and get 
all workspaceId you want to collect after execution of the following json in 
`advanced mode`
     ```json
     [
-            [
-                    {
-                            "plugin": "tapd",
-                            "options": {
-                                    "companyId": 55850509,
-                                    "workspaceId": 1,
-                                    "connectionId": 1
-                            },
-                            "subtasks": [
-                                    "collectCompanies",
-                                    "extractCompanies"
-                            ]
-                    }
-            ]
+      [
+        {
+          "plugin": "tapd",
+          "options": {
+            "companyId": 558***09,
+            "workspaceId": 1,
+            "connectionId": 1
+          },
+          "subtasks": ["collectCompanies", "extractCompanies"]
+        }
+      ]
     ]
     ```
 
-### 5. Jira
-Below is an example for collecting 2 Jira boards sequentially.
+### 7. TAPD + GitLab
+
+Below is an example for collecting a TAPD workspace and a GitLab repo in 
parallel. It has a single stage with a TAPD task and a GitLab task.
+
 ```
 [
     [
         {
-            "plugin": "jira",
+            "plugin": "tapd",
             "options": {
-                "boardId": 8,
+                "workspaceId": 6***14,
                 "connectionId": 1
             }
         }
     ],
     [
         {
-            "plugin": "jira",
-            "options": {
-                "boardId": 26,
-                "connectionId": 1
+            "Plugin":"gitlab",
+            "Options":{
+                "connectionId":1,
+                "projectId":116***98
             }
         }
     ]
 ]
 ```
 
-- `connectionId`: The `ID` field of the table `_tool_jira_connections`.
-- `boardId`: Jira board id, it is the `ID` field of the table 
`_tool_jira_boards`.
-    
+### 8. Zentao
+
+Below is an example for collecting a Zentao workspace. Since users can 
configure multiple Zentao connection, it's required to pass in a `connectionId` 
for TAPD task to specify which connection to use.
+
+```
+[
+  [
+    {
+      plugin: 'zentao',
+      options: {
+        connectionId: 1,
+        productId: 1,
+        projectId: 1,
+        executionId: 1
+      }
+    }
+  ]
+]
+```
+
+- `connectionId`: The ID of your Zentao connection at page 
http://localhost:4000/connections/zentao.
+- `productId`: optional, ZENTAO product id, see "Find Product Id" for details.
+- `projectId`: optional, ZENTAO product id, see "Find Project Id" for details.
+- `executionId`: optional, ZENTAO product id, see "Find Execution Id" for 
details.
 
+You must choose at least one of `productId`, `projectId` and `executionId`.
+
+#### Find Product Id
+
+1. Navigate to the Zentao Product in the browser
+   ![](zentao-product.png)
+2. Click the red square annotated in the pic above
+   ![](zentao-product-id.png)
+3. Then the number in the red circle above is `ProductId`
+
+#### Find Project Id
+
+1. Navigate to the Zentao Project in the browser
+   ![](zentao-project-id.png)
+2. Then the number in the red square above is `ProjectId`
+
+#### Find Execution Id
+
+1. Navigate to the Zentao Execution in the browser
+   ![](zentao-execution-id.png)
+2. Then the number in the red square above is `ExecutionId`
 
 ## Editing a Blueprint (Advanced Mode)
 

Reply via email to