fix: failed builds should not push images

This commit is contained in:
Andras Bacsai 2022-12-01 15:05:21 +01:00
parent 8ccb0c88db
commit cd3af7fa39

View File

@ -185,6 +185,10 @@ import * as buildpacks from '../lib/buildPacks';
if (error !== 1) {
await saveBuildLog({ line: error, buildId, applicationId: application.id });
}
if (!isDev) {
await fs.rm(workdir, { recursive: true, force: true });
}
return;
}
try {
if (application.dockerRegistryImageName) {
@ -600,6 +604,10 @@ import * as buildpacks from '../lib/buildPacks';
if (error !== 1) {
await saveBuildLog({ line: error, buildId, applicationId: application.id });
}
if (!isDev) {
await fs.rm(workdir, { recursive: true, force: true });
}
return;
}
try {
if (application.dockerRegistryImageName) {