fix so always returns
This commit is contained in:
parent
9bf84349d0
commit
22d2e9db30
1 changed files with 10 additions and 12 deletions
|
@ -83,9 +83,16 @@ func provideBuildStore(db *db.DB) core.BuildStore {
|
|||
func provideLogStore(db *db.DB, config config.Config) core.LogStore {
|
||||
if config.S3.Bucket == "" && config.AzureBlob.ContainerName == "" {
|
||||
return logs.New(db)
|
||||
}
|
||||
s := logs.New(db)
|
||||
if config.S3.Bucket != "" {
|
||||
} else if config.AzureBlob.ContainerName != "" {
|
||||
s := logs.New(db)
|
||||
p := logs.NewAzureBlobEnv(
|
||||
config.AzureBlob.ContainerName,
|
||||
config.AzureBlob.StorageAccountName,
|
||||
config.AzureBlob.StorageAccessKey,
|
||||
)
|
||||
return logs.NewCombined(p, s)
|
||||
} else {
|
||||
s := logs.New(db)
|
||||
p := logs.NewS3Env(
|
||||
config.S3.Bucket,
|
||||
config.S3.Prefix,
|
||||
|
@ -94,15 +101,6 @@ func provideLogStore(db *db.DB, config config.Config) core.LogStore {
|
|||
)
|
||||
return logs.NewCombined(p, s)
|
||||
}
|
||||
|
||||
if config.AzureBlob.ContainerName != "" {
|
||||
p := logs.NewAzureBlobEnv(
|
||||
config.AzureBlob.ContainerName,
|
||||
config.AzureBlob.StorageAccountName,
|
||||
config.AzureBlob.StorageAccessKey,
|
||||
)
|
||||
return logs.NewCombined(p, s)
|
||||
}
|
||||
}
|
||||
|
||||
// provideStageStore is a Wire provider function that provides a
|
||||
|
|
Loading…
Reference in a new issue