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

fix(ci): do not build zot container image for the annotation tests (#1110)

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron 2023-01-13 22:50:20 +02:00 committed by GitHub
parent ca1d4beb2a
commit 33b55efc92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,10 @@ EOF
org.opencontainers.image.description: \${{DESCRIPTION}} org.opencontainers.image.description: \${{DESCRIPTION}}
org.opencontainers.image.licenses: \${{LICENSES}} org.opencontainers.image.licenses: \${{LICENSES}}
org.opencontainers.image.vendor: \${{VENDOR}} org.opencontainers.image.vendor: \${{VENDOR}}
EOF
cat > ${BATS_FILE_TMPDIR}/Dockerfile<<EOF
FROM public.ecr.aws/t0x7q1g8/centos:7
CMD ["/bin/sh", "-c", "echo 'It works!'"]
EOF EOF
setup_zot_file_level ${zot_config_file} setup_zot_file_level ${zot_config_file}
wait_zot_reachable "http://127.0.0.1:8080/v2/_catalog" wait_zot_reachable "http://127.0.0.1:8080/v2/_catalog"
@ -66,7 +70,7 @@ function teardown_file() {
} }
@test "build image with podman and specify annotations" { @test "build image with podman and specify annotations" {
run podman build -f build/Dockerfile -t 127.0.0.1:8080/annotations:latest . --format oci --annotation org.opencontainers.image.vendor="CentOS" --annotation org.opencontainers.image.licenses="GPLv2" run podman build -f ${BATS_FILE_TMPDIR}/Dockerfile -t 127.0.0.1:8080/annotations:latest . --format oci --annotation org.opencontainers.image.vendor="CentOS" --annotation org.opencontainers.image.licenses="GPLv2"
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
run podman push 127.0.0.1:8080/annotations:latest --tls-verify=false --format=oci run podman push 127.0.0.1:8080/annotations:latest --tls-verify=false --format=oci
[ "$status" -eq 0 ] [ "$status" -eq 0 ]