Logging improvement
parent
95a72c6851
commit
14c433be76
|
|
@ -489,13 +489,11 @@ class Caching {
|
|||
else {
|
||||
cacheSelection = latest;
|
||||
}
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
||||
if (fs_1.default.existsSync(cacheSelection)) {
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||
cloud_runner_logger_1.default.logCli(`cache item exists`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||
console_1.assert(fs_1.default.existsSync(destinationFolder));
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||
}
|
||||
else {
|
||||
cloud_runner_logger_1.default.logCli(`cache item doesn't exist`);
|
||||
|
|
@ -635,12 +633,12 @@ class CloudRunnerRepositorySetup {
|
|||
yield lfs_hashing_1.LFSHashing.printLFSHashState();
|
||||
cloud_runner_logger_1.default.logCli(`Library Caching`);
|
||||
console_1.assert(!fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull), `!Warning!: The Unity library was included in the git repository`);
|
||||
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryFolderFull);
|
||||
cloud_runner_logger_1.default.logCli(`LFS Caching`);
|
||||
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, `${CloudRunnerRepositorySetup.LFS_ASSETS_HASH}.zip`);
|
||||
yield caching_1.Caching.printCacheState(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryCacheFolder);
|
||||
yield CloudRunnerRepositorySetup.pullLatestLFS();
|
||||
yield caching_1.Caching.PushToCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, CloudRunnerRepositorySetup.LFS_ASSETS_HASH);
|
||||
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryFolderFull);
|
||||
caching_1.Caching.handleCachePurging();
|
||||
}
|
||||
catch (error) {
|
||||
|
|
@ -656,7 +654,6 @@ class CloudRunnerRepositorySetup {
|
|||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
||||
cloud_runner_logger_1.default.logCli(`Cloning the repository being built:`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
||||
cloud_runner_logger_1.default.logCli(cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -lh`);
|
||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree`);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -40,13 +40,11 @@ export class Caching {
|
|||
} else {
|
||||
cacheSelection = latest;
|
||||
}
|
||||
await CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
|
||||
if (fs.existsSync(cacheSelection)) {
|
||||
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||
CloudRunnerLogger.logCli(`cache item exists`);
|
||||
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||
assert(fs.existsSync(destinationFolder));
|
||||
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||
} else {
|
||||
CloudRunnerLogger.logCli(`cache item doesn't exist`);
|
||||
if (cacheSelection !== ``) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ export class CloudRunnerRepositorySetup {
|
|||
!fs.existsSync(CloudRunnerState.libraryFolderFull),
|
||||
`!Warning!: The Unity library was included in the git repository`,
|
||||
);
|
||||
await Caching.PullFromCache(CloudRunnerState.libraryCacheFolder, CloudRunnerState.libraryFolderFull);
|
||||
CloudRunnerLogger.logCli(`LFS Caching`);
|
||||
await Caching.PullFromCache(
|
||||
CloudRunnerState.lfsCacheFolder,
|
||||
|
|
@ -36,6 +35,7 @@ export class CloudRunnerRepositorySetup {
|
|||
CloudRunnerState.lfsDirectory,
|
||||
CloudRunnerRepositorySetup.LFS_ASSETS_HASH,
|
||||
);
|
||||
await Caching.PullFromCache(CloudRunnerState.libraryCacheFolder, CloudRunnerState.libraryFolderFull);
|
||||
Caching.handleCachePurging();
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
|
@ -49,7 +49,6 @@ export class CloudRunnerRepositorySetup {
|
|||
await CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
||||
CloudRunnerLogger.logCli(`Cloning the repository being built:`);
|
||||
await CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
||||
CloudRunnerLogger.logCli(CloudRunnerState.targetBuildRepoUrl);
|
||||
await CloudRunnerAgentSystem.Run(
|
||||
`git clone ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}`,
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue