mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-06 09:31:40 +00:00
Cache intermediate images in the build to allow faster builds
This commit is contained in:
parent
e0b24560b7
commit
d2f2622660
@ -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.
|
# Try pulling the old build first for caching purposes.
|
||||||
docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin/${ARCH}-supervisor:master || true
|
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
|
# Test the gosuper
|
||||||
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
||||||
@ -21,6 +24,12 @@ make ${MAKE_ARGS} \
|
|||||||
DEPLOY_REGISTRY= \
|
DEPLOY_REGISTRY= \
|
||||||
deploy
|
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} \
|
make ${MAKE_ARGS} \
|
||||||
SUPERVISOR_VERSION=${VERSION} \
|
SUPERVISOR_VERSION=${VERSION} \
|
||||||
DEPLOY_REGISTRY= \
|
DEPLOY_REGISTRY= \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user