fix: do not rebuild in case image exists and sha not changed
This commit is contained in:
parent
7bf6041d8c
commit
0904d1ff9c
@ -189,7 +189,7 @@ import * as buildpacks from '../lib/buildPacks';
|
|||||||
let imageFound = false;
|
let imageFound = false;
|
||||||
try {
|
try {
|
||||||
await image.inspect();
|
await image.inspect();
|
||||||
imageFound = false;
|
imageFound = true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ import * as buildpacks from '../lib/buildPacks';
|
|||||||
throw new Error(`Build pack ${buildPack} not found.`);
|
throw new Error(`Build pack ${buildPack} not found.`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await saveBuildLog({ line: 'Nothing changed.', buildId, applicationId });
|
await saveBuildLog({ line: 'Build image already available - no rebuild required.', buildId, applicationId });
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await asyncExecShell(`DOCKER_HOST=${host} docker stop -t 0 ${imageId}`);
|
await asyncExecShell(`DOCKER_HOST=${host} docker stop -t 0 ${imageId}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user