Debug cache extract

pull/310/head
Frostebite 2022-01-13 22:08:44 +00:00
parent b5ef5b6cf2
commit bc58fb2ef4
3 changed files with 7 additions and 5 deletions

5
dist/index.js vendored
View File

@ -608,6 +608,7 @@ class Caching {
const cacheSelection = cacheKey !== `` && fs_1.default.existsSync(`${cacheKey}.zip`) ? cacheKey : latestInBranch;
yield cloud_runner_logger_1.default.log(`cache key ${cacheKey} selection ${cacheSelection}`);
if (fs_1.default.existsSync(`${cacheSelection}.zip`)) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p results`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`);
}
@ -618,13 +619,13 @@ class Caching {
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: process.cwd() });
yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: `results` });
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${fullDestination}`);
}
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}"`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "results" "${destinationFolder}"`);
}
else {
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -93,6 +93,7 @@ export class Caching {
await CloudRunnerLogger.log(`cache key ${cacheKey} selection ${cacheSelection}`);
if (fs.existsSync(`${cacheSelection}.zip`)) {
await CloudRunnerSystem.Run(`mkdir -p results`);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${destinationFolder}`);
}
@ -103,13 +104,13 @@ export class Caching {
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
await extract(`${cacheSelection}.zip`, { dir: process.cwd() });
await extract(`${cacheSelection}.zip`, { dir: `results` });
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${fullDestination}`);
}
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
assert(`${fs.existsSync(fullDestination)}`);
await CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}"`);
await CloudRunnerSystem.Run(`mv "results" "${destinationFolder}"`);
} else {
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
if (cacheSelection !== ``) {