fix: failed builds should not push images
This commit is contained in:
parent
8ccb0c88db
commit
cd3af7fa39
1 changed files with 8 additions and 0 deletions
|
|
@ -185,6 +185,10 @@ import * as buildpacks from '../lib/buildPacks';
|
||||||
if (error !== 1) {
|
if (error !== 1) {
|
||||||
await saveBuildLog({ line: error, buildId, applicationId: application.id });
|
await saveBuildLog({ line: error, buildId, applicationId: application.id });
|
||||||
}
|
}
|
||||||
|
if (!isDev) {
|
||||||
|
await fs.rm(workdir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (application.dockerRegistryImageName) {
|
if (application.dockerRegistryImageName) {
|
||||||
|
|
@ -600,6 +604,10 @@ import * as buildpacks from '../lib/buildPacks';
|
||||||
if (error !== 1) {
|
if (error !== 1) {
|
||||||
await saveBuildLog({ line: error, buildId, applicationId: application.id });
|
await saveBuildLog({ line: error, buildId, applicationId: application.id });
|
||||||
}
|
}
|
||||||
|
if (!isDev) {
|
||||||
|
await fs.rm(workdir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (application.dockerRegistryImageName) {
|
if (application.dockerRegistryImageName) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue