mirror of
https://github.com/docker/build-push-action.git
synced 2026-01-20 17:48:55 +08:00
refactor: Remove sticky disk management while keeping build reporting
- Remove sticky disk mounting and unmounting logic - Remove sticky disk commit logic from both main and post actions - Replace setupStickyDisk with reportBuildStart to only report build start - Update build completion reporting to not depend on exposeId - Keep build tracking and reporting functionality intact The sticky disk lifecycle is now fully managed by setup-docker-builder
This commit is contained in:
parent
7894682343
commit
877a04de98
4 changed files with 28 additions and 84 deletions
|
|
@ -329,6 +329,16 @@ const stickyDiskTimeoutMs = 45000;
|
|||
|
||||
// setupStickyDisk mounts a sticky disk for the entity and returns the device information.
|
||||
// throws an error if it is unable to do so because of a timeout or an error
|
||||
export async function reportBuildStart(dockerfilePath: string): Promise<{docker_build_id: string} | null> {
|
||||
try {
|
||||
const buildResponse = await reporter.reportBuild(dockerfilePath);
|
||||
return buildResponse;
|
||||
} catch (error) {
|
||||
core.warning(`Error reporting build start: ${(error as Error).message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function setupStickyDisk(dockerfilePath: string, setupOnly: boolean): Promise<{device: string; buildId?: string | null; exposeId: string}> {
|
||||
try {
|
||||
const controller = new AbortController();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue