0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

oras fix:

newer version of oras: https://github.com/oras-project/oras/releases/tag/v0.14.0
	rename the --manifest-config to --config for push command

Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
This commit is contained in:
Roxana Nemulescu 2022-08-30 19:29:39 +03:00 committed by Andrei Aaron
parent 5dda12b6a7
commit 3bccea7aa2
6 changed files with 9 additions and 9 deletions

View file

@ -114,7 +114,7 @@ jobs:
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
echo "hello world" > artifact.txt echo "hello world" > artifact.txt
oras push --plain-http localhost:8080/hello-artifact:v2 \ oras push --plain-http localhost:8080/hello-artifact:v2 \
--manifest-config config.json:application/vnd.acme.rocket.config.v1+json \ --config config.json:application/vnd.acme.rocket.config.v1+json \
artifact.txt:text/plain -d -v artifact.txt:text/plain -d -v
rm -f artifact.txt # first delete the file rm -f artifact.txt # first delete the file
oras pull --plain-http localhost:8080/hello-artifact:v2 -d -v oras pull --plain-http localhost:8080/hello-artifact:v2 -d -v

View file

@ -71,11 +71,11 @@ jobs:
curl -Lo notation.tar.gz https://github.com/notaryproject/notation/releases/download/v0.7.1-alpha.1/notation_0.7.1-alpha.1_linux_amd64.tar.gz curl -Lo notation.tar.gz https://github.com/notaryproject/notation/releases/download/v0.7.1-alpha.1/notation_0.7.1-alpha.1_linux_amd64.tar.gz
sudo tar xvzf notation.tar.gz -C /usr/bin notation sudo tar xvzf notation.tar.gz -C /usr/bin notation
# install oras # install oras
curl -LO https://github.com/oras-project/oras/releases/download/v0.12.0/oras_0.12.0_linux_amd64.tar.gz curl -LO https://github.com/oras-project/oras/releases/download/v0.14.0/oras_0.14.0_linux_amd64.tar.gz
mkdir -p oras-install/ mkdir -p oras-install/
tar -zxf oras_0.12.0_*.tar.gz -C oras-install/ tar -zxf oras_0.14.0_*.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/bin/ sudo mv oras-install/oras /usr/bin/
rm -rf oras_0.12.0_*.tar.gz oras-install/ rm -rf oras_0.14.0_*.tar.gz oras-install/
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View file

@ -71,7 +71,7 @@ exporter-minimal: modcheck build-metadata
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zxp-$(OS)-$(ARCH) -buildmode=pie -tags containers_image_openpgp -v -trimpath ./cmd/zxp env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zxp-$(OS)-$(ARCH) -buildmode=pie -tags containers_image_openpgp -v -trimpath ./cmd/zxp
.PHONY: test .PHONY: test
test: check-skopeo $(TESTDATA) $(NOTATION) test: check-skopeo $(TESTDATA) $(NOTATION) $(ORAS)
go test -failfast -tags $(EXTENSIONS),containers_image_openpgp -v -trimpath -race -timeout 15m -cover -coverpkg ./... -coverprofile=coverage-extended.txt -covermode=atomic ./... go test -failfast -tags $(EXTENSIONS),containers_image_openpgp -v -trimpath -race -timeout 15m -cover -coverpkg ./... -coverprofile=coverage-extended.txt -covermode=atomic ./...
go test -failfast -tags containers_image_openpgp -v -trimpath -race -cover -coverpkg ./... -coverprofile=coverage-minimal.txt -covermode=atomic ./... go test -failfast -tags containers_image_openpgp -v -trimpath -race -cover -coverpkg ./... -coverprofile=coverage-minimal.txt -covermode=atomic ./...
# development-mode unit tests possibly using failure injection # development-mode unit tests possibly using failure injection
@ -106,7 +106,7 @@ $(NOTATION):
$(ORAS): $(ORAS):
mkdir -p $(TOOLSDIR)/bin mkdir -p $(TOOLSDIR)/bin
curl -Lo oras.tar.gz https://github.com/oras-project/oras/releases/download/v0.13.0/oras_0.13.0_linux_amd64.tar.gz curl -Lo oras.tar.gz https://github.com/oras-project/oras/releases/download/v0.14.0/oras_0.14.0_linux_amd64.tar.gz
tar xvzf oras.tar.gz -C $(TOOLSDIR)/bin oras tar xvzf oras.tar.gz -C $(TOOLSDIR)/bin oras
rm oras.tar.gz rm oras.tar.gz

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View file

@ -290,7 +290,7 @@ func TestORAS(t *testing.T) {
srcURL := strings.Join([]string{sctlr.Server.Addr, "/oras-artifact:v2"}, "") srcURL := strings.Join([]string{sctlr.Server.Addr, "/oras-artifact:v2"}, "")
cmd = exec.Command("oras", "push", "--plain-http", srcURL, "--manifest-config", cmd = exec.Command("oras", "push", "--plain-http", srcURL, "--config",
"config.json:application/vnd.acme.rocket.config.v1+json", "artifact.txt:text/plain", "-d", "-v") "config.json:application/vnd.acme.rocket.config.v1+json", "artifact.txt:text/plain", "-d", "-v")
cmd.Dir = fileDir cmd.Dir = fileDir

View file

@ -106,7 +106,7 @@ function teardown_file() {
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
echo "hello world" > artifact.txt echo "hello world" > artifact.txt
run oras push --plain-http 127.0.0.1:8080/hello-artifact:v2 \ run oras push --plain-http 127.0.0.1:8080/hello-artifact:v2 \
--manifest-config config.json:application/vnd.acme.rocket.config.v1+json artifact.txt:text/plain -d -v --config config.json:application/vnd.acme.rocket.config.v1+json artifact.txt:text/plain -d -v
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
rm -f artifact.txt rm -f artifact.txt
rm -f config.json rm -f config.json