diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 63de27e214..6294e799c6 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -80,6 +80,23 @@ _run_setup() { fi msg "Copying test binaries from $SKOPEO_CIDEV_CONTAINER_FQIN /usr/local/bin/" cp -a "$mnt/usr/local/bin/"* "/usr/local/bin/" + msg "TEMPORARY: Building a new registry" + rm /usr/local/bin/registry-v2 + ( + export GO111MODULE=off + REG_COMMIT="b5ca020cfbe998e5af3457fda087444cf5116496" + GOPATH=$(mktemp -d -p '' ".tmp_$(basename ${BASH_SOURCE[0]})_XXXXXXXX") + REG_GOSRC="$GOPATH/src/github.com/docker/distribution" + git clone "https://github.com/docker/distribution.git" "$REG_GOSRC" + cd "$REG_GOSRC" + # This is required to be set like this by the build system + export GOPATH="$PWD/Godeps/_workspace:$GOPATH" + # This comes in from the Containerfile + # shellcheck disable=SC2154 + git checkout -q "$REG_COMMIT" + go build -o /usr/local/bin/registry-v2 \ + github.com/docker/distribution/cmd/registry + ) msg "Configuring the openshift registry" # TODO: Put directory & yaml into more sensible place + update integration tests diff --git a/integration/registry.go b/integration/registry.go index 89c0bf2cf0..80d0a7e21c 100644 --- a/integration/registry.go +++ b/integration/registry.go @@ -53,6 +53,9 @@ storage: enabled: true http: addr: %s +compatibility: + schema1: + enabled: true %s` var ( htpasswd string @@ -84,12 +87,13 @@ http: return nil, err } - binary := binaryV2 + var cmd *exec.Cmd if schema1 { - binary = binaryV2Schema1 + cmd = exec.Command(binaryV2Schema1, confPath) + } else { + cmd = exec.Command(binaryV2, "serve", confPath) } - cmd := exec.Command(binary, confPath) consumeAndLogOutputs(c, fmt.Sprintf("registry-%s", url), cmd) if err := cmd.Start(); err != nil { if os.IsNotExist(err) {