diff --git a/Dockerfile b/Dockerfile index 612e62ce..9537817c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.11-alpine AS build ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution -ENV DOCKER_BUILDTAGS include_oss include_gcs +ENV BUILDTAGS include_oss include_gcs ARG GOOS=linux ARG GOARCH=amd64 diff --git a/registry/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go index 33d18a48..fa924f0b 100644 --- a/registry/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -162,11 +162,14 @@ func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) { opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3] - autoRedirect, ok := options["autoredirect"].(bool) - if !ok { - return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect") + autoRedirectVal, ok := options["autoredirect"] + if ok { + autoRedirect, ok := autoRedirectVal.(bool) + if !ok { + return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect") + } + opts.autoRedirect = autoRedirect } - opts.autoRedirect = autoRedirect return opts, nil } diff --git a/releases/v2.7.1.toml b/releases/v2.7.1.toml new file mode 100644 index 00000000..0410ed86 --- /dev/null +++ b/releases/v2.7.1.toml @@ -0,0 +1,26 @@ +# commit to be tagged for new release +commit = "HEAD" + +project_name = "registry" +github_repo = "docker/distribution" + +# previous release +previous = "v2.7.0" + +pre_release = false + +preface = """\ +The first patch release of 2.7 addresses an upgrade issue when +using configurations from pre-2.7 registries. When upgrading from +2.6 or earlier use this patch release or newer to avoid a failure +on startup from not updating the configuration file. + +- Set default for new `autoredirect` option +- GCS driver is now included in binary builds using Dockerfile""" + +# notable prs to include in the release notes, 1234 is the pr number +[notes] + +[breaking] + +[rename_deps] diff --git a/version/version.go b/version/version.go index d05a377e..2519fd6d 100644 --- a/version/version.go +++ b/version/version.go @@ -8,7 +8,7 @@ var Package = "github.com/docker/distribution" // the latest release tag by hand, always suffixed by "+unknown". During // build, it will be replaced by the actual version. The value here will be // used if the registry is run after a go get based install. -var Version = "v2.7.0+unknown" +var Version = "v2.7.1+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time.