Add artifact information in job API
What does this MR do?
Add artifact information on the job controller json response following the same permissions/conditions in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/projects/jobs/_sidebar.html.haml#L6-30
Example response from a job
...
"artifact": {
"download_path": "/root/artifacts/-/jobs/941/artifacts/download",
"browse_path": "/root/artifacts/-/jobs/941/artifacts/browse",
"keep_path": "/root/artifacts/-/jobs/941/artifacts/keep",
"expire_at": "2018-08-28T08:26:38.697Z"
"expired": false
},
...
Things for the review to keep an eye on
- Apart from
jobs_controller_spec.rb
do we need to add tests somewhere else?
What are the relevant issue numbers?
gitlab-org/gitlab-ce#50101
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Steve Xuereb