0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-03-11 02:17:43 -05:00

ci/cd: fix oras cli flags after it got updated

installing notation and oras not needed anymore

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu 2022-07-12 17:21:49 +03:00 committed by Ramkumar Chinchani
parent 26f85ab195
commit 01d742718f
5 changed files with 8 additions and 26 deletions

View file

@ -43,15 +43,6 @@ jobs:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install skopeo
# install notation
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
# install oras
curl -LO https://github.com/oras-project/oras/releases/download/v0.12.0/oras_0.12.0_linux_amd64.tar.gz
mkdir -p oras-install/
tar -zxf oras_0.12.0_*.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/bin/
rm -rf oras_0.12.0_*.tar.gz oras-install/
# install haproxy
sudo apt-get install haproxy
@ -120,11 +111,11 @@ jobs:
skopeo --debug copy --src-tls-verify=false docker://localhost:8080/golang:1.18 oci:golang:1.18
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
echo "hello world" > artifact.txt
oras push 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 \
artifact.txt:text/plain -d -v
rm -f artifact.txt # first delete the file
oras pull localhost:8080/hello-artifact:v2 -d -v -a
oras pull --plain-http localhost:8080/hello-artifact:v2 -d -v
grep -q "hello world" artifact.txt # should print "hello world"
if [ $? -ne 0 ]; then \
killall -r zot-*; \

View file

@ -32,15 +32,6 @@ jobs:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install skopeo
# install notation
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
# install oras
curl -LO https://github.com/oras-project/oras/releases/download/v0.12.0/oras_0.12.0_linux_amd64.tar.gz
mkdir -p oras-install/
tar -zxf oras_0.12.0_*.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/bin/
rm -rf oras_0.12.0_*.tar.gz oras-install/
- name: Run push-pull tests
run: |
make push-pull
@ -55,4 +46,4 @@ jobs:
make bats-sync
- name: Run scrub tests
run: |
make bats-scrub
make bats-scrub

View file

@ -290,7 +290,7 @@ func TestORAS(t *testing.T) {
srcURL := strings.Join([]string{sctlr.Server.Addr, "/oras-artifact:v2"}, "")
cmd = exec.Command("oras", "push", srcURL, "--manifest-config",
cmd = exec.Command("oras", "push", "--plain-http", srcURL, "--manifest-config",
"config.json:application/vnd.acme.rocket.config.v1+json", "artifact.txt:text/plain", "-d", "-v")
cmd.Dir = fileDir
@ -340,7 +340,7 @@ func TestORAS(t *testing.T) {
So(resp.StatusCode(), ShouldEqual, 200)
destURL := strings.Join([]string{dctlr.Server.Addr, "/oras-artifact:v2"}, "")
cmd = exec.Command("oras", "pull", destURL, "-d", "-v", "-a")
cmd = exec.Command("oras", "pull", "--plain-http", destURL, "-d", "-v")
destDir := t.TempDir()
cmd.Dir = destDir
// pulling oras artifact from dest server

View file

@ -68,14 +68,14 @@ function teardown_file() {
@test "push oras artifact" {
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
echo "hello world" > artifact.txt
oras push 127.0.0.1:8080/hello-artifact:v2 \
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
rm -f artifact.txt
rm -f config.json
}
@test "pull oras artifact" {
oras pull 127.0.0.1:8080/hello-artifact:v2 -d -v -a
oras pull --plain-http 127.0.0.1:8080/hello-artifact:v2 -d -v
grep -q "hello world" artifact.txt
rm -f artifact.txt
}

View file

@ -40,7 +40,7 @@ function setup_file() {
],
"onDemand": true,
"tlsVerify": false,
"PollInterval": "30s",
"PollInterval": "20s",
"content": [
{
"prefix": "**"