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