summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-06-12 13:57:59 -0400
committerDaniel Watkins <oddbloke@ubuntu.com>2020-06-15 16:29:23 -0400
commitf0d8dceb0e78be111420374e28cf112f35b6e5d9 (patch)
tree8f0632395dfe6e8c69859a0f4f57c5fec1bb75e8
parent9912b000b27dfb9a42622f522bf12acb51ff74d0 (diff)
downloadcloud-init-git-f0d8dceb0e78be111420374e28cf112f35b6e5d9.tar.gz
.travis.yml: use $TRAVIS_BUILD_DIR for lxd_image caching
This makes us more robust, as our caching won't start breaking if other parts of the Travis build change directory for us.
-rw-r--r--.travis.yml4
1 files changed, 2 insertions, 2 deletions
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 <hash>.rootfs or <hash>, 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