Search before asking
What happened
I set up a project with only a webhook as the data input and made an api call on my local machine to generate a deployment. The API call returns a success code, and I see the deployment when I look at the lake.cicd_deployments and lake.cicd_deployments_commits tables, but I don't see a mapping for it in the lake.cicd_scopes table, which I think is the main issue. Because there's no mapping for lake.cicd_scopes (there are mappings for my jenkins and AzureDevOps deployment pipelines), it doesn't show up in the DORA metrics dashboard. I followed the steps here to set it up: https://devlake.apache.org/docs/Configuration/webhook/
What do you expect to happen
I expect the deployment to show up on the DORA metrics dashboard like it does for my Jenkins and Azure DevOps deployments.
How to reproduce
- Create a new project named Webhook Test
- Create a new webhook and name it Webhook Test
- Run Collect Data
- Create an API key to authenticate with DevLake
- Make the following API call (using your own url):
curl http://localhost:4000/api/rest/plugins/webhook/9/deployments -X 'POST' -H 'Authorization: Bearer {MY_API_KEY}' -d '{
"id": "Test 2",
"createdDate":"2024-09-02T11:00:00+00:00",
"startedDate":"2024-09-02T12:00:00+00:00",
"finishedDate":"2024-09-03T13:00:00+00:00",
"environment":"PRODUCTION",
"result": "SUCCESS",
"displayTitle":"optional-custom-deploy-display-title",
"name": "Test Name",
"deploymentCommits":[
{
"repoUrl":"required-repo-url",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c1",
"commitMsg":"optional-msg-1",
"result":"SUCCESS",
"name":"Test Commit 1",
"displayTitle":"Test Commit 1"
},
{
"repoUrl":"repo-2",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c2",
"commitMsg":"optional-msg-2",
"result":"FAILURE",
"name":"Test Commit 2",
"displayTitle":"Test Commit 2"
}
]
}'
- Run Collect Data
- Check the DORA or DORA Details - Deployment Frequency dashboard
Anything else
I have tried multiple projects and multiple webhooks, but still have this problem with each one.
Version
v1.0.1-beta8@e195107
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
I set up a project with only a webhook as the data input and made an api call on my local machine to generate a deployment. The API call returns a success code, and I see the deployment when I look at the lake.cicd_deployments and lake.cicd_deployments_commits tables, but I don't see a mapping for it in the lake.cicd_scopes table, which I think is the main issue. Because there's no mapping for lake.cicd_scopes (there are mappings for my jenkins and AzureDevOps deployment pipelines), it doesn't show up in the DORA metrics dashboard. I followed the steps here to set it up: https://devlake.apache.org/docs/Configuration/webhook/
What do you expect to happen
I expect the deployment to show up on the DORA metrics dashboard like it does for my Jenkins and Azure DevOps deployments.
How to reproduce
curl http://localhost:4000/api/rest/plugins/webhook/9/deployments -X 'POST' -H 'Authorization: Bearer {MY_API_KEY}' -d '{
"id": "Test 2",
"createdDate":"2024-09-02T11:00:00+00:00",
"startedDate":"2024-09-02T12:00:00+00:00",
"finishedDate":"2024-09-03T13:00:00+00:00",
"environment":"PRODUCTION",
"result": "SUCCESS",
"displayTitle":"optional-custom-deploy-display-title",
"name": "Test Name",
"deploymentCommits":[
{
"repoUrl":"required-repo-url",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c1",
"commitMsg":"optional-msg-1",
"result":"SUCCESS",
"name":"Test Commit 1",
"displayTitle":"Test Commit 1"
},
{
"repoUrl":"repo-2",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c2",
"commitMsg":"optional-msg-2",
"result":"FAILURE",
"name":"Test Commit 2",
"displayTitle":"Test Commit 2"
}
]
}'
Anything else
I have tried multiple projects and multiple webhooks, but still have this problem with each one.
Version
v1.0.1-beta8@e195107
Are you willing to submit PR?
Code of Conduct