Skip to content

Commit

Permalink
Merge pull request #3872 from PetrusZ/cp/release-3.2.0#3871
Browse files Browse the repository at this point in the history
cherry pick #3871 to release 3.2.0
  • Loading branch information
jamsman94 authored Dec 4, 2024
2 parents 0d2bd69 + f946c99 commit 451350c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func modelS3toS3(modelS3 *commonmodels.S3Storage) *step.S3 {
Insecure: modelS3.Insecure,
Provider: modelS3.Provider,
Region: modelS3.Region,
Protocol: "https",
}
if modelS3.Insecure {
resp.Protocol = "http"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@ func (s *toolInstallCtl) PreRun(ctx context.Context) error {
}
objectStorage, _ := commonrepo.NewS3StorageColl().FindDefault()
if objectStorage != nil {
spec.S3Storage.Endpoint = objectStorage.Endpoint
spec.S3Storage.Sk = objectStorage.Sk
spec.S3Storage.Ak = objectStorage.Ak
spec.S3Storage.Subfolder = objectStorage.Subfolder
spec.S3Storage.Bucket = objectStorage.Bucket
spec.S3Storage.Insecure = objectStorage.Insecure
spec.S3Storage.Protocol = "https"
if objectStorage.Insecure {
spec.S3Storage.Protocol = "http"
}
spec.S3Storage.Region = objectStorage.Region
spec.S3Storage = modelS3toS3(objectStorage)
}

for _, tool := range s.toolInstalldSpec.Installs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ func modelS3toS3(modelS3 *commonmodels.S3Storage) *step.S3 {
Insecure: modelS3.Insecure,
Provider: modelS3.Provider,
Region: modelS3.Region,
Protocol: "https",
}
if modelS3.Insecure {
resp.Protocol = "http"
Expand Down

0 comments on commit 451350c

Please sign in to comment.