Skip to content

Instantly share code, notes, and snippets.

@Sdy603
Created August 30, 2024 21:31
Show Gist options
  • Save Sdy603/90491571732003c248ab03bd86b6163d to your computer and use it in GitHub Desktop.
Save Sdy603/90491571732003c248ab03bd86b6163d to your computer and use it in GitHub Desktop.
curl -X POST http://localhost:8080/webhook \
-H "Content-Type: application/json" \
-H "X-Gitlab-Event: Pipeline Hook" \
-H "X-Gitlab-Token: your_gitlab_token" \
-d '{
"object_kind": "pipeline",
"object_attributes": {
"id": 32,
"iid": 4,
"ref": "main",
"sha": "d4c3b2a2962a1d828686f14fac9b80b780504f2a",
"status": "success",
"created_at": "2024-08-30T16:10:00Z",
"finished_at": "2024-08-30T16:15:00Z",
"url": "http://example.com/gitlab-org/gitlab-test/-/pipelines/32"
},
"user": {
"id": 2,
"name": "Jane Doe",
"username": "jdoe",
"email": "[email protected]"
},
"project": {
"id": 2,
"name": "Gitlab Test 2",
"path_with_namespace": "gitlab-org/gitlab-test-2",
"default_branch": "main"
},
"commit": {
"id": "d4c3b2a2962a1d828686f14fac9b80b780504f2a",
"message": "Fix bug in deployment script",
"timestamp": "2024-08-30T16:00:00+02:00",
"url": "http://example.com/gitlab-org/gitlab-test-2/commit/d4c3b2a2962a1d828686f14fac9b80b780504f2a",
"author": {
"name": "Jane Doe",
"email": "[email protected]"
}
},
"builds": [
{
"id": 381,
"stage": "test",
"name": "unit_tests",
"status": "success",
"created_at": "2024-08-30T16:10:00Z",
"started_at": "2024-08-30T16:11:00Z",
"finished_at": "2024-08-30T16:12:30Z",
"duration": 90,
"user": {
"id": 2,
"name": "Jane Doe",
"username": "jdoe",
"email": "[email protected]"
}
}
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment