Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions integration/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ storage:
enabled: true
http:
addr: %s
compatibility:
schema1:
enabled: true
%s`
var (
htpasswd string
Expand Down Expand Up @@ -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) {
Expand Down