ci: integration tests

Signed-off-by: Guido Grazioli <ggraziol@redhat.com>
This commit is contained in:
Guido Grazioli
2023-07-27 14:50:08 +02:00
parent f5b8372a75
commit 198d885b8f
26 changed files with 626 additions and 703 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -eux
set -o pipefail
{
export ANSIBLE_CALLBACKS_ENABLED=profile_tasks
export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt,yaml
[ -d files ] || mkdir files
[ -f files/priv_key ] || (ssh-keygen -t ed25519 -C test@test -f files/priv_key ; ssh-keygen -y -f files/priv_key > files/pub_key)
ansible-playbook playbook.yml "$@"
ansible-inventory -i test.kubevirt.yml -y --list "$@"
ansible-playbook verify.yml -i test.kubevirt.yml --private-key=files/priv_key "$@"
rm "$HOME/.ssh/known_hosts"
} || {
exit 1
}