X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fupdate-lxd-image.sh;h=81b210c83993c88c600682d2096511527164484e;hb=8560c690e667a738adcbc7a53c9c123871f73a8e;hp=ae692f6560d32f5cf318fe12a0761e582b95f68e;hpb=9054244cd2a7451f75157d7fa3ec5d2ff88176be;p=osm%2Fdevops.git diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh index ae692f65..81b210c8 100755 --- a/jenkins/VCA/update-lxd-image.sh +++ b/jenkins/VCA/update-lxd-image.sh @@ -35,8 +35,11 @@ function cache() { # 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" + # Wait for cloud-init to finish + lxc exec $container -- bash -c "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do sleep 1; done" + lxc exec $container -- apt-get update -y - lxc exec $container -- apt-get upgrade -y + lxc exec $container -- apt-get upgrade -y -o Dpkg::Options::='--force-confold' lxc exec $container -- apt-get install -y $PACKAGES $2 lxc exec $container -- pip3 install --upgrade pip lxc exec $container -- pip3 install --upgrade $PYPI