From e01e3ed5444c8093de47229e20abec440530d549 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Tue, 16 Jun 2020 08:26:05 -0400 Subject: .travis.yml: use $TRAVIS_BUILD_DIR for lxd_image caching (#438) This makes us more robust, as our caching won't start breaking if other parts of the Travis build change directory for us. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index b600eccd..56b4b113 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ matrix: # This might be .rootfs or , normalise latest_file="$(basename $latest_file .rootfs)" # Find all files with that prefix and copy them to our cache dir - sudo find /var/snap/lxd/common/lxd/images/ -name $latest_file* -print -exec cp {} lxd_images/ \; + sudo find /var/snap/lxd/common/lxd/images/ -name $latest_file* -print -exec cp {} "$TRAVIS_BUILD_DIR/lxd_images/" \; - | # If a schroot exists (i.e. we didn't fail before its # creation), tar it up (to preserve ownership/permissions) @@ -77,7 +77,7 @@ matrix: - sudo lxd init --auto - sudo mkdir --mode=1777 -p /var/snap/lxd/common/consoles # Move any cached lxd images into lxd's image dir - - sudo find lxd_images/ -type f -print -exec mv {} /var/snap/lxd/common/lxd/images/ \; + - sudo find "$TRAVIS_BUILD_DIR/lxd_images/" -type f -print -exec mv {} /var/snap/lxd/common/lxd/images/ \; - sudo usermod -a -G lxd $USER - sudo sbuild-adduser $USER - cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc -- cgit v1.2.3