src: dont fatal on shutdown
parent
0f425d2ea6
commit
6211bc2630
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
22
src/main.ts
22
src/main.ts
|
@ -57,7 +57,7 @@ async function reportBuildCompleted() {
|
||||||
await postWithRetry(client, '/stickydisks', formData, retryCondition);
|
await postWithRetry(client, '/stickydisks', formData, retryCondition);
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.warning('Error completing Blacksmith build:', error);
|
core.warning('Error reporting build completed:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ async function reportBuildFailed() {
|
||||||
await postWithRetry(client, '/stickydisks', formData, retryCondition);
|
await postWithRetry(client, '/stickydisks', formData, retryCondition);
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.warning('Error completing Blacksmith build:', error);
|
core.warning('Error reporting build failed:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -584,13 +584,17 @@ actionsToolkit.run(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (stateHelper.remoteDockerBuildStatus != '') {
|
if (stateHelper.remoteDockerBuildStatus != '') {
|
||||||
await shutdownBuildkitd();
|
try {
|
||||||
await execAsync(`sudo umount ${mountPoint}`);
|
await shutdownBuildkitd();
|
||||||
core.debug(`${device} has been unmounted`);
|
await execAsync(`sudo umount ${mountPoint}`);
|
||||||
if (stateHelper.remoteDockerBuildStatus == 'success') {
|
core.debug(`${device} has been unmounted`);
|
||||||
await reportBuildCompleted();
|
if (stateHelper.remoteDockerBuildStatus == 'success') {
|
||||||
} else {
|
await reportBuildCompleted();
|
||||||
await reportBuildFailed();
|
} else {
|
||||||
|
await reportBuildFailed();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
core.warning(`Error during Blacksmith builder shutdown: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stateHelper.tmpDir.length > 0) {
|
if (stateHelper.tmpDir.length > 0) {
|
||||||
|
|
Loading…
Reference in New Issue