Commit c7d48c2e authored by Krasimir Angelov's avatar Krasimir Angelov

Add project level route for generic packages upload

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/235492
parent df805fb1
---
title: Add project level route for Generic Packages uploads
merge_request: 596
author:
type: added
...@@ -223,6 +223,9 @@ func (u *upstream) configureRoutes() { ...@@ -223,6 +223,9 @@ func (u *upstream) configureRoutes() {
route("PUT", apiPattern+`v4/packages/conan/`, upload.BodyUploader(api, signingProxy, preparers.packages)), route("PUT", apiPattern+`v4/packages/conan/`, upload.BodyUploader(api, signingProxy, preparers.packages)),
route("PUT", apiPattern+`v4/projects/[0-9]+/packages/conan/`, upload.BodyUploader(api, signingProxy, preparers.packages)), route("PUT", apiPattern+`v4/projects/[0-9]+/packages/conan/`, upload.BodyUploader(api, signingProxy, preparers.packages)),
// Generic Packages Repository
route("PUT", apiPattern+`v4/projects/[0-9]+/packages/generic/`, upload.BodyUploader(api, signingProxy, preparers.packages)),
// NuGet Artifact Repository // NuGet Artifact Repository
route("PUT", apiPattern+`v4/projects/[0-9]+/packages/nuget/`, upload.Accelerate(api, signingProxy, preparers.packages)), route("PUT", apiPattern+`v4/projects/[0-9]+/packages/nuget/`, upload.Accelerate(api, signingProxy, preparers.packages)),
......
...@@ -358,6 +358,7 @@ func TestPackageFilesUpload(t *testing.T) { ...@@ -358,6 +358,7 @@ func TestPackageFilesUpload(t *testing.T) {
"/api/v4/packages/conan/v1/files", "/api/v4/packages/conan/v1/files",
"/api/v4/projects/2412/packages/conan/v1/files", "/api/v4/projects/2412/packages/conan/v1/files",
"/api/v4/projects/2412/packages/maven/v1/files", "/api/v4/projects/2412/packages/maven/v1/files",
"/api/v4/projects/2412/packages/generic/mypackage/0.0.1/myfile.tar.gz",
} }
for _, r := range routes { for _, r := range routes {
......
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