X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fupdate-lxd-image.sh;h=182a33c290b89f1bad6c614363913978df7a2276;hb=26c7001b7f5de87b4fc2d5486e332c4ed674d601;hp=ce14b1dc9312303ed5ee600bc610a794c2e1e70e;hpb=736f9e74eee855d77c05482e8a61098cb8b00552;p=osm%2Fdevops.git diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh old mode 100644 new mode 100755 index ce14b1dc..182a33c2 --- a/jenkins/VCA/update-lxd-image.sh +++ b/jenkins/VCA/update-lxd-image.sh @@ -28,7 +28,9 @@ function cache() { lxc delete $container -f || true lxc launch ubuntu:$series $container - sleep 5 # wait for network + + # Wait for the container to get an IP address + lxc exec $container -- bash -c "for i in {1..60}; do sleep 1; ping -c1 10.44.127.1 &> /dev/null && break; done" lxc exec $container -- apt-get update -y lxc exec $container -- apt-get upgrade -y