Skip to content

Commit

Permalink
MULTIARCH-3440: update the code to use go-containerregistry for all a…
Browse files Browse the repository at this point in the history
…rches and add arm64

Signed-off-by: Paul Bastide <pbastide@redhat.com>
  • Loading branch information
prb112 committed May 25, 2023
1 parent 0bec359 commit 0ab9cb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ builds:
- amd64
- ppc64le
- s390x
- arm64
env:
- CGO_ENABLED=1
flags:
Expand Down
20 changes: 7 additions & 13 deletions test/e2e/lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,27 @@ function install_deps() {
tar xvf opm.tar bin/opm
mv bin/opm $GOBIN
rm -f registry2.tar opm.tar
wget -O $GOBIN/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x $GOBIN/jq
wget -O $GOBIN/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x $GOBIN/jq
else
# non x86_64 flow
pushd ${DATA_TMP}

# Creates a temp directory
mkdir -p test/e2e/operator-test.deps
cd test/e2e/operator-test.deps

curl -o $GOBIN/opm -L https://github.com/operator-framework/operator-registry/releases/download/v1.26.5/linux-$(arch)-opm
chmod +x $GOBIN/opm

# Serves a local registry
# When PR https://github.com/google/go-containerregistry/pull/1680
# is in a release the following few lines won't be necessary.
git clone https://github.com/google/go-containerregistry.git
cd go-containerregistry
git checkout $(git describe --tags) # latest tag
go build ./cmd/crane
mv crane $GOBIN/

GOFLAGS=-mod=mod go install github.com/google/go-containerregistry/cmd/crane@latest
mv ${HOME}/go/bin/crane $GOBIN/

crane export $(arch)/registry:2 registry2.tar
tar xvf registry2.tar bin/registry
cp bin/registry ../
mv bin/registry $GOBIN

cd ..
rm -rf go-containerregistry/
popd
fi
}
Expand Down

0 comments on commit 0ab9cb7

Please sign in to comment.