From 0691332f08f74f80e48680629a3fb8ca15b7ef31 Mon Sep 17 00:00:00 2001 From: Lynwee Date: Fri, 17 May 2024 11:22:15 +0800 Subject: [PATCH] Add display_title (#754) * docs(webhook): update post-deployment api * docs(webhook): update post-deployment api * docs(webhook): add display_title --- docs/Plugins/webhook.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/Plugins/webhook.md b/docs/Plugins/webhook.md index df7238b3973..cb85a876036 100644 --- a/docs/Plugins/webhook.md +++ b/docs/Plugins/webhook.md @@ -53,21 +53,22 @@ If you want to collect deployment data from your system, you can use the incomin You can copy the generated deployment curl commands to your CI/CD script to post deployments to Apache DevLake. Below is the detailed payload schema: -| Key | Required | Notes | -|:---------------------:|:--------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| pipeline_id | ✔️ Yes | related Domain Layer `cicd_pipelines.id`, it's optional before v1.0.0-beta8. | -| environment | ✖️ No | the environment this deployment happens. For example, `PRODUCTION` `STAGING` `TESTING` `DEVELOPMENT`.
The default value is `PRODUCTION` | -| repo_url | ✔️ Yes | the repo URL of the deployment commit
If there is a row in the domain layer table `repos` where `repos.url` equals `repo_url`, the `repoId` will be filled with `repos.id`. | -| repo_id | ✖️ No | related Domain Layer `repos.id`
No default value. | -| name | ✖️ No | deployment name. The default value is "deployment for `request.commit_sha`" | -| ref_name | ✖️ No | related branch/tag
No default value. | -| commit_sha | ✔️ Yes | the sha of the deployment commit | -| commit_msg | ✖️ No | the sha of the deployment commit message | -| create_time | ✖️ No | Time. Eg. 2020-01-01T12:00:00+00:00
No default value. | -| start_time | ✔️ Yes | Time. Eg. 2020-01-01T12:00:00+00:00
No default value. | -| end_time | ✖️ No | Time. Eg. 2020-01-01T12:00:00+00:00
The default value is the time when DevLake receives the POST request. | -| result | ✖️ No | deployment result, one of the values : `SUCCESS`, `FAILURE`, `ABORT`, `MANUAL`,
The default value is `SUCCESS`. | -| deployment_commits | ✖ No | Allow deployment webhook to push deployments to multiple repos in one request, includes display_title,repo_url,commit_sha,commit_msg,name,ref_name. | +| Key | Required | Notes | +|:------------------:|:--------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| pipeline_id | ✔️ Yes | related Domain Layer `cicd_pipelines.id`, it's optional before v1.0.0-beta8. | +| environment | ✖️ No | the environment this deployment happens. For example, `PRODUCTION` `STAGING` `TESTING` `DEVELOPMENT`.
The default value is `PRODUCTION` | +| repo_url | ✔️ Yes | the repo URL of the deployment commit
If there is a row in the domain layer table `repos` where `repos.url` equals `repo_url`, the `repoId` will be filled with `repos.id`. | +| repo_id | ✖️ No | related Domain Layer `repos.id`
No default value. | +| name | ✖️ No | deployment name. The default value is "deployment for `request.commit_sha`" | +| display_title | ✖️ No | deployment display_title. No default value. | +| ref_name | ✖️ No | related branch/tag
No default value. | +| commit_sha | ✔️ Yes | the sha of the deployment commit | +| commit_msg | ✖️ No | the sha of the deployment commit message | +| create_time | ✖️ No | Time. Eg. 2020-01-01T12:00:00+00:00
No default value. | +| start_time | ✔️ Yes | Time. Eg. 2020-01-01T12:00:00+00:00
No default value. | +| end_time | ✖️ No | Time. Eg. 2020-01-01T12:00:00+00:00
The default value is the time when DevLake receives the POST request. | +| result | ✖️ No | deployment result, one of the values : `SUCCESS`, `FAILURE`, `ABORT`, `MANUAL`,
The default value is `SUCCESS`. | +| deployment_commits | ✖ No | Allow deployment webhook to push deployments to multiple repos in one request, includes display_title,repo_url,commit_sha,commit_msg,name,ref_name. | #### Register a Deployment - Sample API Calls