Caching cleanup
parent
19be95bef3
commit
e1d6d6fd3a
|
|
@ -547,11 +547,12 @@ class Caching {
|
|||
}
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`zip -q -r ${cacheKey} ${path_1.default.basename(sourceFolder)}`);
|
||||
console_1.assert(fs_1.default.existsSync(`${cacheKey}`));
|
||||
console_1.assert(cacheFolder);
|
||||
console_1.assert(sourceFolder);
|
||||
console_1.assert(fs_1.default.existsSync(`${cacheFolder}`));
|
||||
console_1.assert(fs_1.default.existsSync(`${sourceFolder}`));
|
||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.basename(sourceFolder)}`));
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
||||
remote_client_logger_1.RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
||||
console_1.assert(path_1.default.join(cacheFolder, `${cacheKey}.zip`));
|
||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(cacheFolder, cacheKey)}.zip`));
|
||||
if (__1.Input.cloudRunnerTests) {
|
||||
yield Caching.printFullCacheHierarchySize();
|
||||
}
|
||||
|
|
@ -585,7 +586,7 @@ class Caching {
|
|||
console_1.assert(fs_1.default.existsSync(destinationFolder));
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path_1.default.basename(destinationFolder)}`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`mv ${path_1.default.basename(destinationFolder)}/* ${destinationFolder}`);
|
||||
console_1.assert(path_1.default.join(destinationFolder, `${cacheSelection}.zip`));
|
||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
||||
}
|
||||
else {
|
||||
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -22,11 +22,12 @@ export class Caching {
|
|||
|
||||
await CloudRunnerAgentSystem.Run(`zip -q -r ${cacheKey} ${path.basename(sourceFolder)}`);
|
||||
assert(fs.existsSync(`${cacheKey}`));
|
||||
assert(cacheFolder);
|
||||
assert(sourceFolder);
|
||||
assert(fs.existsSync(`${cacheFolder}`));
|
||||
assert(fs.existsSync(`${sourceFolder}`));
|
||||
assert(fs.existsSync(`${path.basename(sourceFolder)}`));
|
||||
await CloudRunnerAgentSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
||||
RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
||||
assert(path.join(cacheFolder, `${cacheKey}.zip`));
|
||||
assert(fs.existsSync(`${path.join(cacheFolder, cacheKey)}.zip`));
|
||||
|
||||
if (Input.cloudRunnerTests) {
|
||||
await Caching.printFullCacheHierarchySize();
|
||||
|
|
@ -63,7 +64,7 @@ export class Caching {
|
|||
assert(fs.existsSync(destinationFolder));
|
||||
await CloudRunnerAgentSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path.basename(destinationFolder)}`);
|
||||
await CloudRunnerAgentSystem.Run(`mv ${path.basename(destinationFolder)}/* ${destinationFolder}`);
|
||||
assert(path.join(destinationFolder, `${cacheSelection}.zip`));
|
||||
assert(fs.existsSync(`${path.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
||||
} else {
|
||||
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
||||
if (cacheSelection !== ``) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue