mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-01 00:45:23 +00:00
Merge pull request #280 from resin-io/cache-intermediate-images
Cache intermediate images in the build to allow faster builds
This commit is contained in:
commit
60bf1170e0
@ -7,6 +7,9 @@ ESCAPED_BRANCH_NAME=$(echo $sourceBranch | sed 's/[^a-z0-9A-Z_.-]/-/g')
|
||||
|
||||
# Try pulling the old build first for caching purposes.
|
||||
docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin/${ARCH}-supervisor:master || true
|
||||
# Also pull the intermediate images, if possible, to improve caching
|
||||
docker pull registry.resinstaging.io/resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || docker pull registry.resinstaging.io/resin/node-supervisor-${ARCH}:master || true
|
||||
docker pull registry.resinstaging.io/resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || docker pull registry.resinstaging.io/resin/go-supervisor-${ARCH}:master || true
|
||||
|
||||
# Test the gosuper
|
||||
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
||||
@ -21,6 +24,12 @@ make ${MAKE_ARGS} \
|
||||
DEPLOY_REGISTRY= \
|
||||
deploy
|
||||
|
||||
# Try to push the intermediate images to improve caching in future builds
|
||||
docker tag resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} registry.resinstaging.io/resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME}
|
||||
docker tag resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} registry.resinstaging.io/resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME}
|
||||
docker push registry.resinstaging.io/resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || true
|
||||
docker push registry.resinstaging.io/resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || true
|
||||
|
||||
make ${MAKE_ARGS} \
|
||||
SUPERVISOR_VERSION=${VERSION} \
|
||||
DEPLOY_REGISTRY= \
|
||||
|
Loading…
x
Reference in New Issue
Block a user