Skip to content

Commit

Permalink
Merge pull request #3871 from PetrusZ/fix/s3_provider
Browse files Browse the repository at this point in the history
fix s3 proivder in step tool
  • Loading branch information
jamsman94 authored Dec 4, 2024
2 parents 20977c8 + 998d0cd commit f874117
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 @@ -838,6 +838,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 f874117

Please sign in to comment.