mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-21 12:05:00 +00:00
Auto-merge for PR #520 via VersionBot
automation: Always try to cache using the latest master build
This commit is contained in:
commit
a212d9b7ef
@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v6.4.1 - 2017-11-02
|
||||
|
||||
* Improve caching when building gosuper #520 [Pablo Carranza Velez]
|
||||
* Automation: Always try to cache using the latest master build #520 [Pablo Carranza Velez]
|
||||
|
||||
## v6.4.0 - 2017-11-01
|
||||
|
||||
* Fixes #511, add support for new supervisor image for x86 with quark cpu boards. #512 [Trong Nghia Nguyen]
|
||||
|
@ -42,7 +42,6 @@ RUN cd /source && bash -ex build.sh
|
||||
|
||||
# Build golang supervisor
|
||||
FROM debian:jessie-20170723 as gosuper
|
||||
ARG ARCH
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
@ -95,6 +94,7 @@ WORKDIR /go/src/resin-supervisor/gosuper
|
||||
ENV GOOS linux
|
||||
ENV GO386=387
|
||||
|
||||
ARG ARCH
|
||||
RUN bash ./build.sh
|
||||
RUN rsync -a --delete /go/bin/gosuper /build/
|
||||
|
||||
|
@ -62,36 +62,29 @@ BASE_CACHE=$BASE_IMAGE
|
||||
GO_CACHE=$GO_IMAGE
|
||||
NODE_CACHE=$NODE_IMAGE
|
||||
|
||||
TARGET_CACHE_MASTER=resin/$ARCH-supervisor:master
|
||||
BASE_CACHE_MASTER=resin/$ARCH-supervisor-base:master
|
||||
GO_CACHE_MASTER=resin/$ARCH-supervisor-go:master
|
||||
NODE_CACHE_MASTER=resin/$ARCH-supervisor-node:master
|
||||
|
||||
CACHE_FROM=""
|
||||
function tryPullForCache() {
|
||||
image=$1
|
||||
docker pull $image && {
|
||||
CACHE_FROM="$CACHE_FROM --cache-from $image"
|
||||
} || true
|
||||
}
|
||||
|
||||
# Attempt to pull images for cache
|
||||
# Only if the pull succeeds we add a --cache-from option
|
||||
docker pull $TARGET_CACHE || {
|
||||
TARGET_CACHE=resin/$ARCH-supervisor:master
|
||||
docker pull $TARGET_CACHE
|
||||
} && {
|
||||
CACHE_FROM="$CACHE_FROM --cache-from $TARGET_CACHE"
|
||||
} || true
|
||||
|
||||
docker pull $BASE_CACHE || {
|
||||
BASE_CACHE=resin/$ARCH-supervisor-base:master
|
||||
docker pull $BASE_CACHE
|
||||
} && {
|
||||
CACHE_FROM="$CACHE_FROM --cache-from $BASE_CACHE"
|
||||
} || true
|
||||
|
||||
docker pull $NODE_CACHE || {
|
||||
NODE_CACHE=resin/$ARCH-supervisor-node:master
|
||||
docker pull $NODE_CACHE
|
||||
} && {
|
||||
CACHE_FROM="$CACHE_FROM --cache-from $NODE_CACHE"
|
||||
} || true
|
||||
|
||||
docker pull $GO_CACHE || {
|
||||
GO_CACHE=resin/$ARCH-supervisor-go:master
|
||||
docker pull $GO_CACHE
|
||||
} && {
|
||||
CACHE_FROM="$CACHE_FROM --cache-from $GO_CACHE"
|
||||
} || true
|
||||
tryPullForCache $TARGET_CACHE
|
||||
tryPullForCache $TARGET_CACHE_MASTER
|
||||
tryPullForCache $BASE_CACHE
|
||||
tryPullForCache $BASE_CACHE_MASTER
|
||||
tryPullForCache $GO_CACHE
|
||||
tryPullForCache $GO_CACHE_MASTER
|
||||
tryPullForCache $NODE_CACHE
|
||||
tryPullForCache $NODE_CACHE_MASTER
|
||||
|
||||
if [ "$ENABLE_TESTS" = "true" ]; then
|
||||
make ARCH=$ARCH IMAGE=$GO_IMAGE test-gosuper
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "resin-supervisor",
|
||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||
"version": "6.4.0",
|
||||
"version": "6.4.1",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user