Skip to content

Commit

Permalink
chore: update oras version
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Dec 18, 2024
1 parent ba6fd85 commit 4750b9a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
cd $GITHUB_WORKSPACE
make binary
make bench
make $PWD/hack/tools/bin/oras
- name: Setup minio service
run: |
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
skopeo --debug copy --src-tls-verify=false docker://localhost:8080/golang:1.20 oci:golang:1.20
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
echo "hello world" > artifact.txt
export PATH=$PATH:$PWD/hack/tools/bin
oras push --plain-http localhost:8080/hello-artifact:v2 \
--config config.json:application/vnd.acme.rocket.config.v1+json \
artifact.txt:text/plain -d -v
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COSIGN := $(TOOLSDIR)/bin/cosign
COSIGN_VERSION := 2.2.0
HELM := $(TOOLSDIR)/bin/helm
ORAS := $(TOOLSDIR)/bin/oras
ORAS_VERSION := 1.0.0-rc.1
ORAS_VERSION := 1.2.1
REGCLIENT := $(TOOLSDIR)/bin/regctl
REGCLIENT_VERSION := v0.5.7
CRICTL := $(TOOLSDIR)/bin/crictl
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox/garbage_collect.bats
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ function teardown_file() {
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
# attach signature to image
echo "{\"artifact\": \"\", \"signature\": \"pat hancock\"}" > signature.json
run oras attach --plain-http 127.0.0.1:${zot_port}/golang:1.20 --image-spec v1.1-image --artifact-type 'signature/example' ./signature.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/golang:1.20 --artifact-type 'signature/example' ./signature.json:application/json
[ "$status" -eq 0 ]
# attach sbom to image
echo "{\"version\": \"0.0.0.0\", \"artifact\": \"'127.0.0.1:${zot_port}/golang:1.20'\", \"contents\": \"good\"}" > sbom.json
run oras attach --plain-http 127.0.0.1:${zot_port}/golang:1.20 --image-spec v1.1-image --artifact-type 'sbom/example' ./sbom.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/golang:1.20 --artifact-type 'sbom/example' ./sbom.json:application/json
[ "$status" -eq 0 ]

# attach signature to index image
run oras attach --plain-http 127.0.0.1:${zot_port}/busybox:latest --image-spec v1.1-image --artifact-type 'signature/example' ./signature.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/busybox:latest --artifact-type 'signature/example' ./signature.json:application/json
[ "$status" -eq 0 ]
# attach sbom to index image
echo "{\"version\": \"0.0.0.0\", \"artifact\": \"'127.0.0.1:${zot_port}/golang:1.20'\", \"contents\": \"good\"}" > sbom.json
run oras attach --plain-http 127.0.0.1:${zot_port}/busybox:latest --image-spec v1.1-image --artifact-type 'sbom/example' ./sbom.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/busybox:latest --artifact-type 'sbom/example' ./sbom.json:application/json
[ "$status" -eq 0 ]
}

Expand Down
6 changes: 3 additions & 3 deletions test/blackbox/pushpull.bats
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,17 @@ function teardown_file() {
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
# attach signature
echo "{\"artifact\": \"\", \"signature\": \"pat hancock\"}" > ${BATS_FILE_TMPDIR}/signature.json
run oras attach --plain-http 127.0.0.1:${zot_port}/golang:1.20 --image-spec v1.1-image --artifact-type 'signature/example' ${BATS_FILE_TMPDIR}/signature.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/golang:1.20 --artifact-type 'signature/example' ${BATS_FILE_TMPDIR}/signature.json:application/json
[ "$status" -eq 0 ]
# attach sbom
echo "{\"version\": \"0.0.0.0\", \"artifact\": \"'127.0.0.1:${zot_port}/golang:1.20'\", \"contents\": \"good\"}" > ${BATS_FILE_TMPDIR}/sbom.json
run oras attach --plain-http 127.0.0.1:${zot_port}/golang:1.20 --image-spec v1.1-image --artifact-type 'sbom/example' ${BATS_FILE_TMPDIR}/sbom.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:${zot_port}/golang:1.20 --artifact-type 'sbom/example' ${BATS_FILE_TMPDIR}/sbom.json:application/json
[ "$status" -eq 0 ]
}

@test "discover oras artifacts" {
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
run oras discover --plain-http -o json 127.0.0.1:${zot_port}/golang:1.20
run oras discover --plain-http --format json 127.0.0.1:${zot_port}/golang:1.20
[ "$status" -eq 0 ]
[ $(echo "$output" | jq -r ".manifests | length") -eq 2 ]
}
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox/pushpull_running_dedupe.bats
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function teardown_file() {
# attach signature
echo "{\"artifact\": \"\", \"signature\": \"pat hancock\"}" > ${BATS_FILE_TMPDIR}/signature.json
start=`date +%s`
run oras attach --plain-http 127.0.0.1:8080/alpine:1 --image-spec v1.1-image --artifact-type 'signature/example' ${BATS_FILE_TMPDIR}/signature.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:8080/alpine:1 --artifact-type 'signature/example' ${BATS_FILE_TMPDIR}/signature.json:application/json
[ "$status" -eq 0 ]
end=`date +%s`
runtime=$((end-start))
Expand All @@ -253,7 +253,7 @@ function teardown_file() {
# attach sbom
echo "{\"version\": \"0.0.0.0\", \"artifact\": \"'127.0.0.1:8080/alpine:1'\", \"contents\": \"good\"}" > ${BATS_FILE_TMPDIR}/sbom.json
start=`date +%s`
run oras attach --plain-http 127.0.0.1:8080/alpine:1 --image-spec v1.1-image --artifact-type 'sbom/example' ${BATS_FILE_TMPDIR}/sbom.json:application/json
run oras attach --disable-path-validation --plain-http 127.0.0.1:8080/alpine:1 --artifact-type 'sbom/example' ${BATS_FILE_TMPDIR}/sbom.json:application/json
[ "$status" -eq 0 ]
end=`date +%s`
runtime=$((end-start))
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox/referrers.bats
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ EOF
[ "$status" -eq 0 ]
[ $(echo "${lines[-1]}" | jq '.repositories[]') = '"golang"' ]

run oras attach --plain-http --image-spec v1.1-image --artifact-type image.artifact/type 127.0.0.1:${zot_port}/golang:1.20 ${IMAGE_MANIFEST_REFERRER}
run oras attach --disable-path-validation --plain-http --artifact-type image.artifact/type 127.0.0.1:${zot_port}/golang:1.20 ${IMAGE_MANIFEST_REFERRER}
[ "$status" -eq 0 ]

MANIFEST_DIGEST=$(skopeo inspect --tls-verify=false docker://localhost:${zot_port}/golang:1.20 | jq -r '.Digest')
Expand Down

0 comments on commit 4750b9a

Please sign in to comment.