You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by he...@apache.org on 2022/10/11 05:58:52 UTC

[incubator-devlake-website] branch update-webhook-plugin-doc created (now 0d6e1c64a)

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

hez pushed a change to branch update-webhook-plugin-doc
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git


      at 0d6e1c64a docs: rephrase the GitHub Actions example

This branch includes the following new commits:

     new 2d247e838 docs: simplify summary section and rename CircleCi to CircleCI
     new 140804aa0 docs: update add a new webhook section
     new 0d6e1c64a docs: rephrase the GitHub Actions example

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-devlake-website] 03/03: docs: rephrase the GitHub Actions example

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hez pushed a commit to branch update-webhook-plugin-doc
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit 0d6e1c64a467959923fabd7cf91d7c3271748aca
Author: Hezheng Yin <he...@merico.dev>
AuthorDate: Mon Oct 10 22:52:03 2022 -0700

    docs: rephrase the GitHub Actions example
---
 docs/Plugins/webhook.md | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/docs/Plugins/webhook.md b/docs/Plugins/webhook.md
index 8b1f86e3c..63e8238fb 100644
--- a/docs/Plugins/webhook.md
+++ b/docs/Plugins/webhook.md
@@ -92,15 +92,16 @@ Read more in Swagger: http://localhost:4000/api/swagger/index.html#/plugins%2Fwe
 
 ## Deployments
 
-Adding pipeline webhook in your deploy shells will help you collect data into DevLake.
+If your CI/CD tool isn't already supported by DevLake, you can insert curl commands in your CI/CD script to post deployment data to DevLake.
 
-First, let us know there are two entities: Tasks and Pipelines. A pipeline means one build or deployment, and a pipeline may have more than one task.
+DevLake models CI/CD domain with two entities: Pipelines and Tasks. A pipeline has many tasks.
 
-![image](https://user-images.githubusercontent.com/3294100/191319143-ea5e9546-1c6d-4b2a-abba-95375cfdcec3.png)
+Take GitHub Actions as an example, the screenshot below shows a GitHub Actions workflow, which consists of 6 jobs including `golangci-lint`, `unit-test`, and etc. When DevLake normalizes data from GitHub Actions, it creates the following records in the domain layer:
 
-(Example 1)
+- 1 entry in cicd_pipelines table, corresponds to the GitHub workflow
+- 6 entries in cicd_tasks table, one for each job in the GitHub workflow
 
-For example, we can find 6 tasks like `golangci-lint` and `unit-test` in one GitHub pipeline.
+![image](https://user-images.githubusercontent.com/3294100/191319143-ea5e9546-1c6d-4b2a-abba-95375cfdcec3.png)
 
 ![image](https://user-images.githubusercontent.com/3294100/191319924-f05c4790-d368-4fe4-8c07-dea43e1dd2f3.png)
 


[incubator-devlake-website] 01/03: docs: simplify summary section and rename CircleCi to CircleCI

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hez pushed a commit to branch update-webhook-plugin-doc
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit 2d247e8383bb804aa53e468fe3112ea92a0fa15c
Author: Hezheng Yin <he...@merico.dev>
AuthorDate: Mon Oct 10 18:36:57 2022 -0700

    docs: simplify summary section and rename CircleCi to CircleCI
---
 docs/Plugins/webhook.md | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/docs/Plugins/webhook.md b/docs/Plugins/webhook.md
index 2a07e8d84..17627796e 100644
--- a/docs/Plugins/webhook.md
+++ b/docs/Plugins/webhook.md
@@ -4,21 +4,16 @@ description: >
   Webhook Plugin
 ---
 
-## Summary
+## Overview 
 
-[Webhooks](https://en.wikipedia.org/wiki/Webhook) are user-defined HTTP callbacks that can be used for causing an event on one site that will trigger certain behavior on another site. They can be triggered in your deployment and bug recording systems, such as build shells in Jenkins or Jira. 
+An Incoming Webhook allows users to actively push data to DevLake. It's particularly useful when DevLake is missing the plugin that pulls data from your DevOps tool.
 
-![webhook](https://user-images.githubusercontent.com/3294100/191303047-b66ece00-5095-420e-b52a-b61146de0d43.png)
-(Image from the Internet)
+When you create an Incoming Webhook within DevLake, DevLake generates a unique URL. You can post JSON payloads to this URL to push data to DevLake.
 
-While using webhooks in DevLake, your systems play the roles of system A as shown in the above image, and Apache DevLake as system B. You can use webhooks to:
+As of v0.14.0, users can push incidents and deployments data required by DORA metrics to DevLake via Incoming Webhook.
 
-* record bugs or incidents when DevLake cannot collect data from issue applications directly.
-* detect code deployments by using custom deploy-time measurement 
+## Creating webhooks in DevLake
 
-DevLake does not limit the number of webhook requests. **But be aware** that your Database or other servers may not handle unlimited requests.
-
-## Configuration
 Configuring webhooks via the Config UI.
 
 First, you can create a webhook connection from the Integration page. 
@@ -172,10 +167,10 @@ curl http://127.0.0.1:4000/api/plugins/webhook/1/cicd_pipeline/A123/finish -X 'P
 
 Read more in Swagger: http://localhost:4000/api/swagger/index.html#/plugins%2Fwebhook/post_plugins_webhook__connectionId_issues. 
 
-### Sample Config in CircleCi
+### Sample Config in CircleCI
 
-First, we need to know that CircleCi has three entities: pipeline, workflow, and job, and the entity workflow is the entity task in DevLake. 
-Second, we must get pipelines and task data from the build machine. In CircleCi, the data define in env, and we can get it by $CIRCLE_WORKFLOW_JOB_ID and so on. So we can write config to send task data in each workflow and send the close pipeline request in the last workflow.
+First, we need to know that CircleCI has three entities: pipeline, workflow, and job, and the entity workflow is the entity task in DevLake.
+Second, we must get pipelines and task data from the build machine. In CircleCI, the data define in env, and we can get it by $CIRCLE_WORKFLOW_JOB_ID and so on. So we can write config to send task data in each workflow and send the close pipeline request in the last workflow.
 
 ```yaml
 version: 2.1
@@ -220,7 +215,7 @@ workflows:
 
 
 
-Actually, we finish the webhook in prev step. If we want to do more, the config in CircleCi is as fellow. It will call webhook before tasks start and after tasks fail.
+Actually, we finish the webhook in prev step. If we want to do more, the config in CircleCI is as fellow. It will call webhook before tasks start and after tasks fail.
 ```yaml
 # Use the latest 2.1 version of CircleCI pipeline process engine.
 # See: https://circleci.com/docs/2.0/configuration-reference


[incubator-devlake-website] 02/03: docs: update add a new webhook section

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hez pushed a commit to branch update-webhook-plugin-doc
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit 140804aa0f7315315a0d4912345c68ba6d499738
Author: Hezheng Yin <he...@merico.dev>
AuthorDate: Mon Oct 10 19:52:44 2022 -0700

    docs: update add a new webhook section
---
 docs/Plugins/webhook.md              |  9 +++------
 docs/UserManuals/ConfigUI/webhook.md | 12 ++++++------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/docs/Plugins/webhook.md b/docs/Plugins/webhook.md
index 17627796e..8b1f86e3c 100644
--- a/docs/Plugins/webhook.md
+++ b/docs/Plugins/webhook.md
@@ -14,19 +14,16 @@ As of v0.14.0, users can push incidents and deployments data required by DORA me
 
 ## Creating webhooks in DevLake
 
-Configuring webhooks via the Config UI.
-
-First, you can create a webhook connection from the Integration page. 
+### Add a new webhook
+To add a new webhook, go to "Data Connections" page in config-ui and select "Issue/Deployment Incoming/Webhook".
 ![image](https://user-images.githubusercontent.com/3294100/191309840-460fbc9c-15a1-4b12-a510-9ed5ccd8f2b0.png)
 
 We recommand that you give your webhook connection a unique name so that you can identify and manage where you have used it later.
 
-After cicking on "Generate POST URL", you will find four webhook URLs. Copy the ones that suits your usage into your CI or issue tracking systems. You can always come back to the webhook page to copy the URLs later on.
+After clicking on "Generate POST URL", you will find four webhook URLs. Copy the ones that suits your usage into your CI or issue tracking systems. You can always come back to the webhook page to copy the URLs later on.
 
 ![image](https://user-images.githubusercontent.com/3294100/191400110-327c153f-b236-47e3-88cc-85bf8fcae310.png)
 
-
-
 ## Incident / Issue
 
 If you want to collect issue or incident data from your system, you can use the two webhooks for issues. 
diff --git a/docs/UserManuals/ConfigUI/webhook.md b/docs/UserManuals/ConfigUI/webhook.md
index a879e3117..b7fb984cc 100644
--- a/docs/UserManuals/ConfigUI/webhook.md
+++ b/docs/UserManuals/ConfigUI/webhook.md
@@ -4,16 +4,16 @@ sidebar_position: 7
 description: Config UI instruction for Webhook
 ---
 
-Visit config-ui: `http://localhost:4000`.
-### Add and Update  Data Connections
+Visit config-ui: `http://localhost:4000` if you deployed via docker-compose.
+
+### Add a new webhook
 ![image](https://user-images.githubusercontent.com/3294100/191309840-460fbc9c-15a1-4b12-a510-9ed5ccd8f2b0.png)
 
-#### Connection Name
-Name your connection.
+#### Webhook name
 We recommand that you give your webhook connection a unique name so that you can identify and manage where you have used it later.
 
-### Use Webhook
-After cicking on "Generate POST URL", you will find four webhook URLs. Copy the ones that suits your usage into your CI or issue tracking systems. You can always come back to the webhook page to copy the URLs later on.
+### Use Webhooks
+After clicking on "Generate POST URL", you will find four webhook URLs. Copy the ones that suits your usage into your CI or issue tracking systems. You can always come back to the webhook page to copy the URLs later on.
 
 ![image](https://user-images.githubusercontent.com/3294100/191400110-327c153f-b236-47e3-88cc-85bf8fcae310.png)