1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

just wait for ssh to be open

This commit is contained in:
Jason N. 2024-03-14 10:52:21 -04:00
parent 545b79d69a
commit d0abe79886
2 changed files with 28 additions and 20 deletions

View file

@ -161,10 +161,11 @@ jobs:
with:
submodules: recursive
- name: Ensure qemu is installed
- name: Install test tools
run: |
sudo apt-get update
sudo apt-get install -y qemu qemu-utils xorriso unzip qemu-system-x86 netcat socat jq isomd5sum ansible make coreutils
sudo apt-get install -y make
make install-test-deps
- name: Create disk
run: |
@ -253,7 +254,7 @@ jobs:
timeout 1m bash -c "while ! (echo > /dev/tcp/127.0.0.1/4321); do sleep 0.1; done"
(tail -f vm.stdin | nc localhost 4321 | tee vm.stdout) &
timeout 30m bash -c "while ! (grep 'login:' vm.stdout); do sleep 1; done"
timeout 30m bash -c "while ! (echo > /dev/tcp/${VM_IP}/${VM_PORT}); do sleep 1; done"
if ! (echo > /dev/tcp/${VM_IP}/${VM_PORT})
then
@ -261,17 +262,6 @@ jobs:
fi
echo "VM ready for tests at IP ${VM_IP}:${VM_PORT}"
echo "Creating Ansible inventory"
cat << EOF > ansible_inventory
ungrouped:
hosts:
vm:
ansible_host: ${VM_IP}
ansible_port: ${VM_PORT}
ansible_user: ${VM_USER}
ansible_password: ${VM_PASS}
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
EOF
#make test-vm
make test-vm VM_IP=${VM_IP} VM_PORT=${VM_PORT} VM_USER=${VM_USER} VM_PASS=${VM_PASS}
kill $QEMU_PID