mirror of
https://github.com/project-zot/zot.git
synced 2025-03-04 02:02:49 -05:00
ci: reenable test calling stacker (#2890)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
parent
717091a058
commit
b8437991cb
2 changed files with 15 additions and 17 deletions
2
.github/workflows/ecosystem-tools.yaml
vendored
2
.github/workflows/ecosystem-tools.yaml
vendored
|
@ -61,6 +61,8 @@ jobs:
|
||||||
make bin/dex
|
make bin/dex
|
||||||
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
|
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
# Prepare for stacker run on Ubuntu 24
|
||||||
|
sudo ./scripts/enable_userns.sh
|
||||||
- name: Run CI tests
|
- name: Run CI tests
|
||||||
run: |
|
run: |
|
||||||
make run-blackbox-ci
|
make run-blackbox-ci
|
||||||
|
|
|
@ -105,23 +105,19 @@ function teardown_file() {
|
||||||
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Licenses') = '"GPLv2"' ]
|
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Licenses') = '"GPLv2"' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable because of stacker errors on Ubuntu 24.04.1:
|
@test "build image with stacker and specify annotations" {
|
||||||
## entering private mount namespace failed: Permission denied
|
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||||
# parent read(): No error information
|
run stacker --oci-dir ${BATS_FILE_TMPDIR}/stackeroci --stacker-dir ${BATS_FILE_TMPDIR}/.stacker --roots-dir ${BATS_FILE_TMPDIR}/roots build -f ${BATS_FILE_TMPDIR}/stacker.yaml --substitute IMAGE_NAME="ghcr.io/project-zot/golang" --substitute IMAGE_TAG="1.20" --substitute DESCRIPTION="mydesc" --substitute VENDOR="CentOs" --substitute LICENSES="GPLv2" --substitute COMMIT= --substitute OS=$OS --substitute ARCH=$ARCH
|
||||||
# error: exit status 1
|
[ "$status" -eq 0 ]
|
||||||
# @test "build image with stacker and specify annotations" {
|
run stacker --oci-dir ${BATS_FILE_TMPDIR}/stackeroci --stacker-dir ${BATS_FILE_TMPDIR}/.stacker --roots-dir ${BATS_FILE_TMPDIR}/roots publish -f ${BATS_FILE_TMPDIR}/stacker.yaml --substitute IMAGE_NAME="ghcr.io/project-zot/golang" --substitute IMAGE_TAG="1.20" --substitute DESCRIPTION="mydesc" --substitute VENDOR="CentOs" --substitute LICENSES="GPLv2" --url docker://127.0.0.1:${zot_port} --tag 1.20 --skip-tls
|
||||||
# zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
[ "$status" -eq 0 ]
|
||||||
# run stacker --oci-dir ${BATS_FILE_TMPDIR}/stackeroci --stacker-dir ${BATS_FILE_TMPDIR}/.stacker --roots-dir ${BATS_FILE_TMPDIR}/roots build -f ${BATS_FILE_TMPDIR}/stacker.yaml --substitute IMAGE_NAME="ghcr.io/project-zot/golang" --substitute IMAGE_TAG="1.20" --substitute DESCRIPTION="mydesc" --substitute VENDOR="CentOs" --substitute LICENSES="GPLv2" --substitute COMMIT= --substitute OS=$OS --substitute ARCH=$ARCH
|
run curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ ImageList(repo: \"ghcr.io/project-zot/golang\") { Results { RepoName Tag Manifests {Digest ConfigDigest Size Layers { Size Digest }} Vendor Licenses Description }}}"}' http://localhost:${zot_port}/v2/_zot/ext/search
|
||||||
# [ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
# run stacker --oci-dir ${BATS_FILE_TMPDIR}/stackeroci --stacker-dir ${BATS_FILE_TMPDIR}/.stacker --roots-dir ${BATS_FILE_TMPDIR}/roots publish -f ${BATS_FILE_TMPDIR}/stacker.yaml --substitute IMAGE_NAME="ghcr.io/project-zot/golang" --substitute IMAGE_TAG="1.20" --substitute DESCRIPTION="mydesc" --substitute VENDOR="CentOs" --substitute LICENSES="GPLv2" --url docker://127.0.0.1:${zot_port} --tag 1.20 --skip-tls
|
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].RepoName') = '"ghcr.io/project-zot/golang"' ]
|
||||||
# [ "$status" -eq 0 ]
|
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Description') = '"mydesc"' ]
|
||||||
# run curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ ImageList(repo: \"ghcr.io/project-zot/golang\") { Results { RepoName Tag Manifests {Digest ConfigDigest Size Layers { Size Digest }} Vendor Licenses Description }}}"}' http://localhost:${zot_port}/v2/_zot/ext/search
|
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Vendor') = '"CentOs"' ]
|
||||||
# [ "$status" -eq 0 ]
|
[ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Licenses') = '"GPLv2"' ]
|
||||||
# [ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].RepoName') = '"ghcr.io/project-zot/golang"' ]
|
}
|
||||||
# [ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Description') = '"mydesc"' ]
|
|
||||||
# [ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Vendor') = '"CentOs"' ]
|
|
||||||
# [ $(echo "${lines[-1]}" | jq '.data.ImageList.Results[0].Licenses') = '"GPLv2"' ]
|
|
||||||
# }
|
|
||||||
|
|
||||||
@test "sign/verify with cosign (only tag-based signatures)" {
|
@test "sign/verify with cosign (only tag-based signatures)" {
|
||||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||||
|
|
Loading…
Add table
Reference in a new issue