Commit d83fd708 authored by Imre Farkas's avatar Imre Farkas

Merge branch '33596-adds-pipeline-object-to-package' into 'master'

Adds pipeline object to package

See merge request gitlab-org/gitlab!22854
parents df14a8b0 ddeb1686
......@@ -81,7 +81,15 @@ Example response:
},
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
"pipeline": {
"id": 123,
"status": "pending",
"ref": "new-pipeline",
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"web_url": "https://example.com/foo/bar/pipelines/47",
"created_at": "2016-08-11T11:28:34.085Z",
"updated_at": "2016-08-11T11:32:35.169Z",
}
}
},
{
......@@ -95,7 +103,15 @@ Example response:
},
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
"pipeline": {
"id": 123,
"status": "pending",
"ref": "new-pipeline",
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"web_url": "https://example.com/foo/bar/pipelines/47",
"created_at": "2016-08-11T11:28:34.085Z",
"updated_at": "2016-08-11T11:32:35.169Z",
}
}
}
]
......@@ -141,7 +157,15 @@ Example response:
},
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
"pipeline": {
"id": 123,
"status": "pending",
"ref": "new-pipeline",
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"web_url": "https://example.com/foo/bar/pipelines/47",
"created_at": "2016-08-11T11:28:34.085Z",
"updated_at": "2016-08-11T11:32:35.169Z",
}
}
}
```
......
---
title: Adds pipeline object to package API
merge_request: 22854
author:
type: added
......@@ -880,7 +880,7 @@ module EE
extend EntityHelpers
class BuildInfo < Grape::Entity
expose :pipeline_id
expose :pipeline, using: ::API::Entities::PipelineBasic
end
expose :id
......
......@@ -7,9 +7,9 @@
"package_type": { "type": "string" },
"build_info": {
"type": "object",
"required": ["pipeline_id"],
"required": ["pipeline"],
"properties": {
"pipeline_id": { "type": "integer" }
"pipeline": { "$ref": "../pipeline.json" }
}
}
}
......
{
"type": "object",
"required": ["id", "sha", "ref", "status", "created_at", "updated_at", "web_url"],
"properties": {
"id": {
"type": "integer"
},
"sha": {
"type": "string"
},
"ref": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"web_url": {
"type": "string"
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment