mirror of https://github.com/harness/drone.git
[AH-329]: Updated manifest issue and unnecessary logging (#2648)
* [AH-329]: Updated manifest issue and unnecessary logging (cherry picked from commit ee1bfc443ed5a6625994115ef2014b7bb568c2ec)CODE-2402
parent
7ff4fd0186
commit
acef055ea2
|
@ -195,7 +195,7 @@ func backfillURLs(config *types.Config) error {
|
||||||
config.URL.UI = baseURL.String()
|
config.URL.UI = baseURL.String()
|
||||||
}
|
}
|
||||||
if config.URL.Registry == "" {
|
if config.URL.Registry == "" {
|
||||||
config.URL.Registry = baseURL.String()
|
config.URL.Registry = combineToRawURL(scheme, "host.docker.internal", port, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -18,6 +18,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/harness/gitness/app/paths"
|
"github.com/harness/gitness/app/paths"
|
||||||
api "github.com/harness/gitness/registry/app/api/openapi/contracts/artifact"
|
api "github.com/harness/gitness/registry/app/api/openapi/contracts/artifact"
|
||||||
|
@ -184,7 +185,7 @@ func getManifestConfig(
|
||||||
driver storagedriver.StorageDriver,
|
driver storagedriver.StorageDriver,
|
||||||
) (*manifestConfig, error) {
|
) (*manifestConfig, error) {
|
||||||
var config manifestConfig
|
var config manifestConfig
|
||||||
path, err := storage.PathFn(rootRef, digest)
|
path, err := storage.PathFn(strings.ToLower(rootRef), digest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to get path: %w", err)
|
return nil, fmt.Errorf("failed to get path: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ func init() {
|
||||||
log.Error().Stack().Err(err).Msgf("Register adapter factory for %s", adapterType)
|
log.Error().Stack().Err(err).Msgf("Register adapter factory for %s", adapterType)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Info().Msgf("Factory for adapter %s registered", adapterType)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newAdapter(
|
func newAdapter(
|
||||||
|
|
|
@ -91,7 +91,7 @@ type Config struct {
|
||||||
Container string `envconfig:"GITNESS_URL_CONTAINER"`
|
Container string `envconfig:"GITNESS_URL_CONTAINER"`
|
||||||
|
|
||||||
// Registry is used as a base to generate external facing URLs.
|
// Registry is used as a base to generate external facing URLs.
|
||||||
// Value is derived from Base unless explicitly specified (e.g. http://localhost:3000).
|
// Value is derived from HTTP.Server unless explicitly specified (e.g. http://host.docker.internal:3000).
|
||||||
Registry string `envconfig:"GITNESS_REGISTRY_URL"`
|
Registry string `envconfig:"GITNESS_REGISTRY_URL"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue