From e443da60c44db553aff6474fed57c575b3c2dfdd Mon Sep 17 00:00:00 2001 From: sfalexrog Date: Fri, 8 Feb 2019 15:49:25 +0300 Subject: [PATCH] Try to cache initial Raspbian image --- .travis.yml | 6 ++++++ builder/image-build.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3b97c718..8910b8e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,16 @@ matrix: fast_finish: true include: - name: "Raspberry Pi Image Build" + cache: + directories: + - imgcache before_script: - docker pull ${DOCKER} + - if [ -d imgcache ]; then mkdir -p images && cp imgcache/*.zip images; fi script: - docker run --privileged --rm -v /dev:/dev -v $(pwd):/builder/repo -e TRAVIS_TAG="${TRAVIS_TAG}" ${DOCKER} + before_cache: + - cp images/*.zip imgcache before_deploy: # Set up git user name and tag this commit - git config --local user.name "goldarte" diff --git a/builder/image-build.sh b/builder/image-build.sh index 909a94ce..5644c67a 100755 --- a/builder/image-build.sh +++ b/builder/image-build.sh @@ -60,7 +60,7 @@ get_image() { if [ ! -e "${BUILD_DIR}/${RPI_ZIP_NAME}" ]; then echo_stamp "Downloading original Linux distribution" - wget --progress=bar:force:noscroll -O ${BUILD_DIR}/${RPI_ZIP_NAME} $2 + wget --progress=dot:giga -O ${BUILD_DIR}/${RPI_ZIP_NAME} $2 echo_stamp "Downloading complete" "SUCCESS" \ else echo_stamp "Linux distribution already donwloaded"; fi