Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-27 22:20:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-27 22:20:54 +0300
commitc5b70709451c5ea9ed3cb850b31d524832a4aae1 (patch)
tree845dd0f0f0394429931eab0b4615773d446ef272
parent418555ba81982c6ee683a39dbdec134d69bebb3f (diff)
Add latest changes from gitlab-org/gitlab@15-0-stable-ee
-rw-r--r--workhorse/internal/upload/artifacts_uploader.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/workhorse/internal/upload/artifacts_uploader.go b/workhorse/internal/upload/artifacts_uploader.go
index c1c49638e21..3c2d89e976f 100644
--- a/workhorse/internal/upload/artifacts_uploader.go
+++ b/workhorse/internal/upload/artifacts_uploader.go
@@ -35,6 +35,7 @@ var zipSubcommandsErrorsCounter = promauto.NewCounterVec(
}, []string{"error"})
type artifactsUploadProcessor struct {
+ opts *destination.UploadOpts
format string
SavedFileTracker
@@ -51,7 +52,7 @@ func Artifacts(myAPI *api.API, h http.Handler, p Preparer) http.Handler {
format := r.URL.Query().Get(ArtifactFormatKey)
- mg := &artifactsUploadProcessor{format: format, SavedFileTracker: SavedFileTracker{Request: r}}
+ mg := &artifactsUploadProcessor{opts: opts, format: format, SavedFileTracker: SavedFileTracker{Request: r}}
interceptMultipartFiles(w, r, h, a, mg, opts)
}, "/authorize")
}
@@ -61,9 +62,12 @@ func (a *artifactsUploadProcessor) generateMetadataFromZip(ctx context.Context,
defer metaWriter.Close()
metaOpts := &destination.UploadOpts{
- LocalTempPath: os.TempDir(),
+ LocalTempPath: a.opts.LocalTempPath,
TempFilePrefix: "metadata.gz",
}
+ if metaOpts.LocalTempPath == "" {
+ metaOpts.LocalTempPath = os.TempDir()
+ }
fileName := file.LocalPath
if fileName == "" {