Skip to content

Commit

Permalink
tests: containerize vagrant commands with podman
Browse files Browse the repository at this point in the history
Added a function to wrap vagrant commands within a podman container

Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed Jun 18, 2024
1 parent 4dc7d96 commit 938b837
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/scripts/vagrant_up.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/bash

vagrant(){
podman run -it --rm \
-e LIBVIRT_DEFAULT_URI \
-e SSH_AUTH_SOCK="${SSH_AUTH_SOCK}" \
-v /var/run/libvirt/:/var/run/libvirt/ \
-v ~/.vagrant.d:/.vagrant.d \
-v $(realpath "${PWD}"):${PWD} \
-w "${PWD}" \
--network host \
--entrypoint /bin/bash \
--security-opt label=disable \
docker.io/vagrantlibvirt/vagrant-libvirt:latest \
vagrant $@
}

set -x
if [[ -n $1 ]]; then
DIRECTORY=$1
Expand Down

0 comments on commit 938b837

Please sign in to comment.