Merge pull request #2041 from balena-io/2040-fix-deploy-exit

deploy: Fix unexpected exit with "Everything is up to date"
This commit is contained in:
bulldozer-balena[bot] 2020-09-20 00:18:08 +00:00 committed by GitHub
commit 4c9a22aba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,12 +243,12 @@ ${dockerignoreHelp}
compositionToBuild.services,
servicesToSkip,
);
let builtImagesByService: Dictionary<any> = {};
if (_.size(compositionToBuild.services) === 0) {
logger.logInfo(
'Everything is up to date (use --build to force a rebuild)',
);
return {};
}
} else {
const builtImages = await compose.buildProject(
docker,
logger,
@ -265,8 +265,8 @@ ${dockerignoreHelp}
composeOpts.nogitignore,
composeOpts.multiDockerignore,
);
const builtImagesByService = _.keyBy(builtImages, 'serviceName');
builtImagesByService = _.keyBy(builtImages, 'serviceName');
}
const images = project.descriptors.map(
(d) =>
builtImagesByService[d.serviceName] ?? {