X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FVCA%2Fupdate-lxd-image.sh;h=8cad93b8275808f2eedc0f73f731d35e53dfc67c;hb=7389cfc324a43f09a1b50a3bfd10cd6e8b32abf9;hp=ae692f6560d32f5cf318fe12a0761e582b95f68e;hpb=745eb6349f911f6c70e67e89e1a5a0a05b438ebb;p=osm%2Fdevops.git diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh index ae692f65..8cad93b8 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 @@ -48,5 +51,6 @@ function cache() { lxc delete $container -f || true } -cache trusty "$TRUSTY_PACKAGES" +# Cache the image for the Ubuntu series or series to support +# cache trusty "$TRUSTY_PACKAGES" cache xenial "$XENIAL_PACKAGES"