feat(build): add verbose build output, progress logging, and timing for builds/tests
This commit is contained in:
@@ -67,23 +67,15 @@ export class TsDockerCache {
|
||||
const entry = this.data.entries[cleanTag];
|
||||
|
||||
if (!entry) {
|
||||
console.log(`[cache] ${cleanTag}:`);
|
||||
console.log(`[cache] Content hash: ${contentHash}`);
|
||||
console.log(`[cache] Stored hash: (none)`);
|
||||
console.log(`[cache] Hash match: no`);
|
||||
console.log(`→ Building ${cleanTag}`);
|
||||
logger.log('info', `[cache] ${cleanTag}: no cached entry, will build`);
|
||||
return false;
|
||||
}
|
||||
|
||||
const hashMatch = entry.contentHash === contentHash;
|
||||
console.log(`[cache] ${cleanTag}:`);
|
||||
console.log(`[cache] Content hash: ${contentHash}`);
|
||||
console.log(`[cache] Stored hash: ${entry.contentHash}`);
|
||||
console.log(`[cache] Image ID: ${entry.imageId}`);
|
||||
console.log(`[cache] Hash match: ${hashMatch ? 'yes' : 'no'}`);
|
||||
logger.log('info', `[cache] ${cleanTag}: hash ${hashMatch ? 'matches' : 'changed'}`);
|
||||
|
||||
if (!hashMatch) {
|
||||
console.log(`→ Building ${cleanTag}`);
|
||||
logger.log('info', `[cache] ${cleanTag}: content changed, will build`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -92,14 +84,13 @@ export class TsDockerCache {
|
||||
`docker image inspect ${entry.imageId} > /dev/null 2>&1`
|
||||
);
|
||||
const available = inspectResult.exitCode === 0;
|
||||
console.log(`[cache] Available: ${available ? 'yes' : 'no'}`);
|
||||
|
||||
if (available) {
|
||||
console.log(`→ Skipping build for ${cleanTag} (cache hit)`);
|
||||
logger.log('info', `[cache] ${cleanTag}: cache hit, skipping build`);
|
||||
return true;
|
||||
}
|
||||
|
||||
console.log(`→ Building ${cleanTag} (image no longer available)`);
|
||||
logger.log('info', `[cache] ${cleanTag}: image no longer available, will build`);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user