mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 13:47:52 +00:00
Warn early if deploying a multicontainer project to an incompatible app
Change-Type: patch
This commit is contained in:
parent
62f006b89a
commit
066ac591ac
@ -20,6 +20,12 @@ buildProject = (docker, logger, composeOpts, opts) ->
|
||||
composeOpts.projectName
|
||||
)
|
||||
.then (project) ->
|
||||
if project.descriptors.length > 1 and not opts.app.application_type?[0]?.supports_multicontainer
|
||||
logger.logWarn(
|
||||
'Target application does not support multiple containers.\n' +
|
||||
'Continuing with build, but you will not be able to deploy.'
|
||||
)
|
||||
|
||||
compose.buildProject(
|
||||
docker
|
||||
logger
|
||||
|
@ -26,6 +26,9 @@ deployProject = (docker, logger, composeOpts, opts) ->
|
||||
opts.image
|
||||
)
|
||||
.then (project) ->
|
||||
if project.descriptors.length > 1 and !opts.app.application_type?[0]?.supports_multicontainer
|
||||
throw new Error('Target application does not support multiple containers. Aborting!')
|
||||
|
||||
# find which services use images that already exist locally
|
||||
Promise.map project.descriptors, (d) ->
|
||||
# unconditionally build (or pull) if explicitly requested
|
||||
|
Loading…
Reference in New Issue
Block a user