Upload packages to Generic package registry
What does this MR do?
This MR adds new API endpoints to support uploading generic packages files (accelerated through Workhorse).
The upload endpoint is
PUT /api/v4/projects/:id/packages/generic/:package_name/:package_version/:file_name
Example usage
$ curl -i --header 'Private-Token: <token>' \
> --upload-file ./spec/fixtures/packages/generic/myfile.tar.gz \
> http://localhost:3001/api/v4/projects/1/packages/generic/foobar/1.0.0/myfile.tar.gz
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 25
Content-Type: application/json
Etag: W/"6025f9a740871d09d0230776e3dbc7bf"
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: A4gfjZVQWP
X-Runtime: 0.565214
Date: Thu, 03 Sep 2020 09:13:09 GMT
{"message":"201 Created"}
Personal access token and job tokens are supported for authentication.
Related to #235492 (closed).
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Dominic Couture