mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 06:33:30 +00:00
Remove the dummy node-build step for debug images
Change-type: patch
This commit is contained in:
parent
31257f8f39
commit
ec816d115e
@ -22,8 +22,6 @@ FROM balenalib/i386-nlp-node:6-jessie as i386-nlp-node-base
|
||||
RUN echo '#!/bin/sh\nexit 0' > /usr/bin/cross-build-start && chmod +x /usr/bin/cross-build-start \
|
||||
&& echo '#!/bin/sh\nexit 0' > /usr/bin/cross-build-end && chmod +x /usr/bin/cross-build-end
|
||||
|
||||
# A little hack to make this work with the makefile
|
||||
FROM $ARCH-node-base AS node-build
|
||||
FROM $ARCH-node-base AS node-deps
|
||||
|
||||
RUN [ "cross-build-start" ]
|
||||
|
@ -45,10 +45,6 @@ TARGET_IMAGE=balena/$ARCH-supervisor:$TAG$DEBUG
|
||||
NODE_IMAGE=balena/$ARCH-supervisor-node:$TAG$DEBUG
|
||||
NODE_BUILD_IMAGE=balena/$ARCH-supervisor-node:$TAG-build$DEBUG
|
||||
|
||||
TARGET_CACHE=$TARGET_IMAGE
|
||||
NODE_CACHE=$NODE_IMAGE
|
||||
NODE_BUILD_CACHE=$NODE_BUILD_IMAGE
|
||||
|
||||
TARGET_CACHE_MASTER=balena/$ARCH-supervisor:master$DEBUG
|
||||
NODE_CACHE_MASTER=balena/$ARCH-supervisor-node:master$DEBUG
|
||||
NODE_BUILD_CACHE_MASTER=balena/$ARCH-supervisor-node:master-build$DEBUG
|
||||
@ -63,23 +59,29 @@ function useCache() {
|
||||
docker pull $image &
|
||||
}
|
||||
|
||||
useCache $TARGET_CACHE
|
||||
useCache $TARGET_IMAGE
|
||||
useCache $TARGET_CACHE_MASTER
|
||||
useCache $NODE_CACHE
|
||||
useCache $NODE_IMAGE
|
||||
useCache $NODE_CACHE_MASTER
|
||||
useCache $NODE_BUILD_CACHE
|
||||
useCache $NODE_BUILD_CACHE_MASTER
|
||||
# Debug images don't include nodebuild
|
||||
if [ -z "$DEBUG" ]; then
|
||||
useCache $NODE_BUILD_IMAGE
|
||||
useCache $NODE_BUILD_CACHE_MASTER
|
||||
fi
|
||||
wait
|
||||
|
||||
export DOCKER_BUILD_OPTIONS=${CACHE_FROM}
|
||||
export ARCH
|
||||
export MIXPANEL_TOKEN
|
||||
|
||||
make IMAGE=$NODE_BUILD_IMAGE nodebuild
|
||||
if [ "$PUSH_IMAGES" = "true" ]; then
|
||||
# Debug images don't include nodebuild
|
||||
if [ -z "$DEBUG" ]; then
|
||||
make IMAGE=$NODE_BUILD_IMAGE nodebuild
|
||||
if [ "$PUSH_IMAGES" = "true" ]; then
|
||||
make IMAGE=$NODE_BUILD_IMAGE deploy &
|
||||
fi
|
||||
export DOCKER_BUILD_OPTIONS="${DOCKER_BUILD_OPTIONS} --cache-from ${NODE_BUILD_IMAGE}"
|
||||
fi
|
||||
export DOCKER_BUILD_OPTIONS="${DOCKER_BUILD_OPTIONS} --cache-from ${NODE_BUILD_IMAGE}"
|
||||
|
||||
make IMAGE=$NODE_IMAGE nodedeps
|
||||
if [ "$PUSH_IMAGES" = "true" ]; then
|
||||
@ -106,7 +108,5 @@ if [ "$CLEANUP" = "true" ]; then
|
||||
$TARGET_IMAGE \
|
||||
$NODE_IMAGE \
|
||||
$NODE_BUILD_IMAGE \
|
||||
$TARGET_CACHE \
|
||||
$NODE_BUILD_CACHE \
|
||||
$NODE_CACHE
|
||||
$TARGET_CACHE
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user