From fbfc7523cb0119ac3a0d02cd04dc12e453ad3ad6 Mon Sep 17 00:00:00 2001 From: Ido Leibovich Date: Mon, 31 Oct 2016 22:38:24 +0200 Subject: Add api endpoint for creating a pipeline Add a new endpoint in the new API for creating a new pipeline, and return the details of that pipeline. --- doc/api/pipelines.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'doc/api/pipelines.md') diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index a29b3eb6f44..6455c333faf 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -114,6 +114,51 @@ Example of response } ``` +## Create a new pipeline + +> [Introduced][ce-7209] in GitLab 8.14 + +``` +POST /projects/:id/pipeline +``` + +| Attribute | Type | Required | Description | +|------------|---------|----------|---------------------| +| `id` | integer | yes | The ID of a project | +| `ref` | string | yes | Reference to commit | + +``` +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipeline?ref=master" +``` + +Example of response + +```json +{ + "id": 61, + "sha": "384c444e840a515b23f21915ee5766b87068a70d", + "ref": "master", + "status": "pending", + "before_sha": "0000000000000000000000000000000000000000", + "tag": false, + "yaml_errors": null, + "user": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://localhost:3000/root" + }, + "created_at": "2016-11-04T09:36:13.747Z", + "updated_at": "2016-11-04T09:36:13.977Z", + "started_at": null, + "finished_at": null, + "committed_at": null, + "duration": null +} +``` + ## Retry failed builds in a pipeline > [Introduced][ce-5837] in GitLab 8.11 @@ -205,3 +250,4 @@ Response: ``` [ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837 +[ce-7209]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7209 -- cgit v1.2.1 From 752d72f87635c1f43f3334d7e2dd96ab77eeba7d Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 25 Nov 2016 17:38:51 +0100 Subject: Add docs for pipeline coverage [ci skip] --- doc/api/pipelines.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'doc/api/pipelines.md') diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index 6455c333faf..82351ae688f 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -41,7 +41,8 @@ Example of response "started_at": null, "finished_at": null, "committed_at": null, - "duration": null + "duration": null, + "coverage": "30.0" }, { "id": 48, @@ -64,7 +65,8 @@ Example of response "started_at": null, "finished_at": null, "committed_at": null, - "duration": null + "duration": null, + "coverage": null } ] ``` @@ -110,7 +112,8 @@ Example of response "started_at": null, "finished_at": "2016-08-11T11:32:35.145Z", "committed_at": null, - "duration": null + "duration": null, + "coverage": "30.0" } ``` @@ -155,7 +158,8 @@ Example of response "started_at": null, "finished_at": null, "committed_at": null, - "duration": null + "duration": null, + "coverage": null } ``` @@ -200,7 +204,8 @@ Response: "started_at": null, "finished_at": "2016-08-11T11:32:35.145Z", "committed_at": null, - "duration": null + "duration": null, + "coverage": null } ``` @@ -245,7 +250,8 @@ Response: "started_at": null, "finished_at": "2016-08-11T11:32:35.145Z", "committed_at": null, - "duration": null + "duration": null, + "coverage": null } ``` -- cgit v1.2.1