Try to cache initial Raspbian image

This commit is contained in:
sfalexrog
2019-02-08 15:49:25 +03:00
committed by Oleg Kalachev
parent ab026a5ea5
commit e443da60c4
2 changed files with 7 additions and 1 deletions

View File

@@ -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"

View File

@@ -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