hashing driven enhancement for cache
parent
feafcc8371
commit
ede387eed3
|
|
@ -538,7 +538,7 @@ class Caching {
|
||||||
}
|
}
|
||||||
process.chdir(`${sourceFolder}/..`);
|
process.chdir(`${sourceFolder}/..`);
|
||||||
if (__1.Input.cloudRunnerTests) {
|
if (__1.Input.cloudRunnerTests) {
|
||||||
cloud_runner_logger_1.default.log(yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder));
|
cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder)}`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${sourceFolder}`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${sourceFolder}`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
||||||
}
|
}
|
||||||
|
|
@ -747,7 +747,9 @@ class LFSHashing {
|
||||||
static hashAllFiles(folder) {
|
static hashAllFiles(folder) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
process.chdir(`${folder}`);
|
process.chdir(`${folder}`);
|
||||||
return yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`find -type f -exec md5sum "{}" + | sort`);
|
return yield (yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`))
|
||||||
|
.replace(/\n/g, '')
|
||||||
|
.split(` `)[0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -17,7 +17,7 @@ export class Caching {
|
||||||
process.chdir(`${sourceFolder}/..`);
|
process.chdir(`${sourceFolder}/..`);
|
||||||
|
|
||||||
if (Input.cloudRunnerTests) {
|
if (Input.cloudRunnerTests) {
|
||||||
CloudRunnerLogger.log(await LFSHashing.hashAllFiles(sourceFolder));
|
CloudRunnerLogger.log(`Hashed cache folder ${await LFSHashing.hashAllFiles(sourceFolder)}`);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${sourceFolder}`);
|
await CloudRunnerAgentSystem.Run(`tree ${sourceFolder}`);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
await CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ export class LFSHashing {
|
||||||
}
|
}
|
||||||
public static async hashAllFiles(folder: string) {
|
public static async hashAllFiles(folder: string) {
|
||||||
process.chdir(`${folder}`);
|
process.chdir(`${folder}`);
|
||||||
return await CloudRunnerAgentSystem.Run(`find -type f -exec md5sum "{}" + | sort`);
|
return await (await CloudRunnerAgentSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`))
|
||||||
|
.replace(/\n/g, '')
|
||||||
|
.split(` `)[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue