fixing cache folder
parent
387201e907
commit
6a1b8387cb
|
|
@ -545,18 +545,18 @@ class Caching {
|
||||||
if (__1.Input.cloudRunnerTests) {
|
if (__1.Input.cloudRunnerTests) {
|
||||||
yield Caching.printFullCacheHierarchySize();
|
yield Caching.printFullCacheHierarchySize();
|
||||||
}
|
}
|
||||||
process.chdir(sourceFolder);
|
process.chdir(`${sourceFolder}`);
|
||||||
if (__1.Input.cloudRunnerTests) {
|
if (__1.Input.cloudRunnerTests) {
|
||||||
cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder}`);
|
cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${path_1.default.basename(sourceFolder)}`);
|
||||||
}
|
}
|
||||||
if (__1.Input.cloudRunnerTests) {
|
if (__1.Input.cloudRunnerTests) {
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls`);
|
||||||
}
|
}
|
||||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.basename(sourceFolder)}`));
|
console_1.assert(fs_1.default.existsSync(`./../${path_1.default.basename(sourceFolder)}`));
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`zip${__1.Input.cloudRunnerTests ? '' : ' -q'} -r ${cacheKey}.zip ./../${path_1.default.basename(sourceFolder)}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`zip${__1.Input.cloudRunnerTests ? '' : ' -q'} -r ${cacheKey}.zip ./../${path_1.default.basename(sourceFolder)}`);
|
||||||
console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`));
|
console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`));
|
||||||
console_1.assert(fs_1.default.existsSync(`${cacheFolder}`));
|
console_1.assert(fs_1.default.existsSync(`${cacheFolder}`));
|
||||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.basename(sourceFolder)}`));
|
console_1.assert(fs_1.default.existsSync(`./../${path_1.default.basename(sourceFolder)}`));
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
remote_client_logger_1.RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
||||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(cacheFolder, cacheKey)}.zip`));
|
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(cacheFolder, cacheKey)}.zip`));
|
||||||
|
|
@ -590,7 +590,7 @@ class Caching {
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`);
|
||||||
}
|
}
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`cache item exists`);
|
remote_client_logger_1.RemoteClientLogger.log(`cache item exists`);
|
||||||
console_1.assert(fs_1.default.existsSync(destinationFolder));
|
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path_1.default.basename(destinationFolder)}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path_1.default.basename(destinationFolder)}`);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${path_1.default.basename(destinationFolder)}/* ${destinationFolder}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${path_1.default.basename(destinationFolder)}/* ${destinationFolder}`);
|
||||||
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -18,23 +18,27 @@ export class Caching {
|
||||||
if (Input.cloudRunnerTests) {
|
if (Input.cloudRunnerTests) {
|
||||||
await Caching.printFullCacheHierarchySize();
|
await Caching.printFullCacheHierarchySize();
|
||||||
}
|
}
|
||||||
process.chdir(sourceFolder);
|
process.chdir(`${sourceFolder}`);
|
||||||
|
|
||||||
if (Input.cloudRunnerTests) {
|
if (Input.cloudRunnerTests) {
|
||||||
CloudRunnerLogger.log(`Hashed cache folder ${await LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder}`);
|
CloudRunnerLogger.log(
|
||||||
|
`Hashed cache folder ${await LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${path.basename(
|
||||||
|
sourceFolder,
|
||||||
|
)}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Input.cloudRunnerTests) {
|
if (Input.cloudRunnerTests) {
|
||||||
await CloudRunnerSystem.Run(`ls`);
|
await CloudRunnerSystem.Run(`ls`);
|
||||||
}
|
}
|
||||||
assert(fs.existsSync(`${path.basename(sourceFolder)}`));
|
assert(fs.existsSync(`./../${path.basename(sourceFolder)}`));
|
||||||
|
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`zip${Input.cloudRunnerTests ? '' : ' -q'} -r ${cacheKey}.zip ./../${path.basename(sourceFolder)}`,
|
`zip${Input.cloudRunnerTests ? '' : ' -q'} -r ${cacheKey}.zip ./../${path.basename(sourceFolder)}`,
|
||||||
);
|
);
|
||||||
assert(fs.existsSync(`${cacheKey}.zip`));
|
assert(fs.existsSync(`${cacheKey}.zip`));
|
||||||
assert(fs.existsSync(`${cacheFolder}`));
|
assert(fs.existsSync(`${cacheFolder}`));
|
||||||
assert(fs.existsSync(`${path.basename(sourceFolder)}`));
|
assert(fs.existsSync(`./../${path.basename(sourceFolder)}`));
|
||||||
await CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
await CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
|
||||||
RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
|
||||||
assert(fs.existsSync(`${path.join(cacheFolder, cacheKey)}.zip`));
|
assert(fs.existsSync(`${path.join(cacheFolder, cacheKey)}.zip`));
|
||||||
|
|
@ -71,7 +75,7 @@ export class Caching {
|
||||||
await CloudRunnerSystem.Run(`tree ${destinationFolder}`);
|
await CloudRunnerSystem.Run(`tree ${destinationFolder}`);
|
||||||
}
|
}
|
||||||
RemoteClientLogger.log(`cache item exists`);
|
RemoteClientLogger.log(`cache item exists`);
|
||||||
assert(fs.existsSync(destinationFolder));
|
assert(`${fs.existsSync(destinationFolder)}`);
|
||||||
await CloudRunnerSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path.basename(destinationFolder)}`);
|
await CloudRunnerSystem.Run(`unzip -q ${cacheSelection}.zip -d ${path.basename(destinationFolder)}`);
|
||||||
await CloudRunnerSystem.Run(`mv ${path.basename(destinationFolder)}/* ${destinationFolder}`);
|
await CloudRunnerSystem.Run(`mv ${path.basename(destinationFolder)}/* ${destinationFolder}`);
|
||||||
assert(fs.existsSync(`${path.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
assert(fs.existsSync(`${path.join(destinationFolder, `${cacheSelection}.zip`)}`));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue