tree extracted cache folders
							parent
							
								
									2972271e57
								
							
						
					
					
						commit
						2968d5662e
					
				|  | @ -435,6 +435,7 @@ const cli_decorator_1 = __webpack_require__(8731); | ||||||
| const remote_client_logger_1 = __webpack_require__(28082); | const remote_client_logger_1 = __webpack_require__(28082); | ||||||
| const cloud_runner_state_1 = __webpack_require__(70912); | const cloud_runner_state_1 = __webpack_require__(70912); | ||||||
| const setup_cloud_runner_repository_1 = __webpack_require__(39656); | const setup_cloud_runner_repository_1 = __webpack_require__(39656); | ||||||
|  | const SDK = __importStar(__webpack_require__(71786)); | ||||||
| class CLI { | class CLI { | ||||||
|     static RunCli(options) { |     static RunCli(options) { | ||||||
|         return __awaiter(this, void 0, void 0, function* () { |         return __awaiter(this, void 0, void 0, function* () { | ||||||
|  | @ -495,6 +496,14 @@ class CLI { | ||||||
|     static cachePull() { |     static cachePull() { | ||||||
|         return __awaiter(this, void 0, void 0, function* () { }); |         return __awaiter(this, void 0, void 0, function* () { }); | ||||||
|     } |     } | ||||||
|  |     static garbageCollectAws() { | ||||||
|  |         return __awaiter(this, void 0, void 0, function* () { | ||||||
|  |             process.env.AWS_REGION = __1.Input.region; | ||||||
|  |             const CF = new SDK.CloudFormation(); | ||||||
|  |             const stacks = yield CF.listStacks().promise(); | ||||||
|  |             cloud_runner_logger_1.default.log(JSON.stringify(stacks, undefined, 4)); | ||||||
|  |         }); | ||||||
|  |     } | ||||||
| } | } | ||||||
| __decorate([ | __decorate([ | ||||||
|     cli_decorator_1.CliFunction(`cli`, `runs a cloud runner build`) |     cli_decorator_1.CliFunction(`cli`, `runs a cloud runner build`) | ||||||
|  | @ -508,6 +517,9 @@ __decorate([ | ||||||
| __decorate([ | __decorate([ | ||||||
|     cli_decorator_1.CliFunction(`cach-pull`, `pull from cache`) |     cli_decorator_1.CliFunction(`cach-pull`, `pull from cache`) | ||||||
| ], CLI, "cachePull", null); | ], CLI, "cachePull", null); | ||||||
|  | __decorate([ | ||||||
|  |     cli_decorator_1.CliFunction(`garbage-collect-aws`, `garbage collect aws`) | ||||||
|  | ], CLI, "garbageCollectAws", null); | ||||||
| exports.CLI = CLI; | exports.CLI = CLI; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -612,6 +624,9 @@ class Caching { | ||||||
|                         fs_1.default.rmSync(destinationFolder, { recursive: true, force: true }); |                         fs_1.default.rmSync(destinationFolder, { recursive: true, force: true }); | ||||||
|                     } |                     } | ||||||
|                     fs_1.default.renameSync(path_1.default.resolve(destinationParentFolder, resultsFolder), destinationFolder); |                     fs_1.default.renameSync(path_1.default.resolve(destinationParentFolder, resultsFolder), destinationFolder); | ||||||
|  |                     if (__1.Input.cloudRunnerTests) { | ||||||
|  |                         yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationParentFolder}`); | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); |                     remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -7,6 +7,8 @@ import { CliFunction, GetAllCliModes, GetCliFunctions } from './cli-decorator'; | ||||||
| import { RemoteClientLogger } from './remote-client/remote-client-services/remote-client-logger'; | import { RemoteClientLogger } from './remote-client/remote-client-services/remote-client-logger'; | ||||||
| import { CloudRunnerState } from '../cloud-runner/state/cloud-runner-state'; | import { CloudRunnerState } from '../cloud-runner/state/cloud-runner-state'; | ||||||
| import { SetupCloudRunnerRepository } from './remote-client/setup-cloud-runner-repository'; | import { SetupCloudRunnerRepository } from './remote-client/setup-cloud-runner-repository'; | ||||||
|  | import * as SDK from 'aws-sdk'; | ||||||
|  | 
 | ||||||
| export class CLI { | export class CLI { | ||||||
|   static async RunCli(options: any): Promise<void> { |   static async RunCli(options: any): Promise<void> { | ||||||
|     Input.githubInputEnabled = false; |     Input.githubInputEnabled = false; | ||||||
|  | @ -74,4 +76,13 @@ export class CLI { | ||||||
| 
 | 
 | ||||||
|   @CliFunction(`cach-pull`, `pull from cache`) |   @CliFunction(`cach-pull`, `pull from cache`) | ||||||
|   static async cachePull() {} |   static async cachePull() {} | ||||||
|  | 
 | ||||||
|  |   @CliFunction(`garbage-collect-aws`, `garbage collect aws`) | ||||||
|  |   static async garbageCollectAws() { | ||||||
|  |     process.env.AWS_REGION = Input.region; | ||||||
|  |     const CF = new SDK.CloudFormation(); | ||||||
|  | 
 | ||||||
|  |     const stacks = await CF.listStacks().promise(); | ||||||
|  |     CloudRunnerLogger.log(JSON.stringify(stacks, undefined, 4)); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -87,6 +87,9 @@ export class Caching { | ||||||
|           fs.rmSync(destinationFolder, { recursive: true, force: true }); |           fs.rmSync(destinationFolder, { recursive: true, force: true }); | ||||||
|         } |         } | ||||||
|         fs.renameSync(path.resolve(destinationParentFolder, resultsFolder), destinationFolder); |         fs.renameSync(path.resolve(destinationParentFolder, resultsFolder), destinationFolder); | ||||||
|  |         if (Input.cloudRunnerTests) { | ||||||
|  |           await CloudRunnerSystem.Run(`tree ${destinationParentFolder}`); | ||||||
|  |         } | ||||||
|       } else { |       } else { | ||||||
|         RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); |         RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); | ||||||
|         if (cacheSelection !== ``) { |         if (cacheSelection !== ``) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue