Extend pipeline/job webhook information how it was initiated and runner on what it starts
Problem to solve
We want distinguish Pipelines
/Jobs
started manually from such run automatically (by commit or some other trigger) and see runner
information which pick up that job.
Intended users
DevOps engineers and Developers who write integration with Gitlab.
Further details
- Pipeline events contains runner information for inner builds:
{
"object_kind": "pipeline",
...
"builds":[
{ ...
"runner": {
"id":380987,
"description":"shared-runners-manager-6.gitlab.com",
"active":true,
"is_shared":true
},
...
but Job information very sophisticated:
{
"object_kind": "job",
"ref": "gitlab-script-trigger",
"tag": false,
"before_sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"job_id": 1977,
"job_name": "test",
"job_stage": "test",
"job_status": "created",
"job_started_at": null,
"job_finished_at": null,
"job_duration": null,
"job_allow_failure": false,
"job_failure_reason": "script_failure",
"project_id": 380,
"project_name": "gitlab-org/gitlab-test",
"user": {
"id": 3,
"name": "User",
"email": "user@gitlab.com"
},
"commit": {
"id": 2366,
"sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"message": "test\n",
"author_name": "User",
"author_email": "user@gitlab.com",
"status": "created",
"duration": null,
"started_at": null,
"finished_at": null
},
"repository": {
"name": "gitlab_test",
"description": "Atque in sunt eos similique dolores voluptatem.",
"homepage": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
"git_ssh_url": "git@192.168.64.1:gitlab-org/gitlab-test.git",
"git_http_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test.git",
"visibility_level": 20
}
}
and even does not contain ID of pipeline!
Proposal
Please include in Job webhook information at-least:
- Type and reason how it started (user manual, triggered by push, API...)
- Runner information if it present on that state.
In pipeline information how it was run also would be helpful.
Permissions and Security
I think only amount of returned information should be extended and no changes in security.