better aws cli commands and better cleanup for aws
parent
3bd297d1c8
commit
fc3724600e
|
|
@ -1817,12 +1817,9 @@ exports.TaskDefinitionFormation = void 0;
|
|||
class TaskDefinitionFormation {
|
||||
}
|
||||
exports.TaskDefinitionFormation = TaskDefinitionFormation;
|
||||
TaskDefinitionFormation.description = `AWS Fargate cluster that can span public and private subnets. Supports public
|
||||
facing load balancers, private internal load balancers, and both internal and
|
||||
external service discovery namespaces.`;
|
||||
TaskDefinitionFormation.description = `Game CI Cloud Runner Task Stack`;
|
||||
TaskDefinitionFormation.formation = `AWSTemplateFormatVersion: 2010-09-09
|
||||
Description: >-
|
||||
|
||||
Description: ${TaskDefinitionFormation.description}
|
||||
Parameters:
|
||||
EnvironmentName:
|
||||
Type: String
|
||||
|
|
@ -2008,6 +2005,7 @@ const cli_functions_repository_1 = __nccwpck_require__(85301);
|
|||
const input_1 = __importDefault(__nccwpck_require__(91933));
|
||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
||||
const base_stack_formation_1 = __nccwpck_require__(29643);
|
||||
const task_definition_formation_1 = __nccwpck_require__(97647);
|
||||
class AwsCliCommands {
|
||||
static awsListAll() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
@ -2021,7 +2019,8 @@ class AwsCliCommands {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
process.env.AWS_REGION = input_1.default.region;
|
||||
const CF = new aws_sdk_1.default.CloudFormation();
|
||||
const stacks = ((_a = (yield CF.listStacks().promise()).StackSummaries) === null || _a === void 0 ? void 0 : _a.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription !== base_stack_formation_1.BaseStackFormation.baseStackDecription)) || [];
|
||||
const stacks = ((_a = (yield CF.listStacks().promise()).StackSummaries) === null || _a === void 0 ? void 0 : _a.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' &&
|
||||
_x.TemplateDescription === task_definition_formation_1.TaskDefinitionFormation.description.replace('\n', ''))) || [];
|
||||
cloud_runner_logger_1.default.log(`Stacks ${stacks.length}`);
|
||||
for (const element of stacks) {
|
||||
if (perResultCallback)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +1,7 @@
|
|||
export class TaskDefinitionFormation {
|
||||
public static readonly description: string = `Game CI Cloud Runner Task Stack`;
|
||||
public static readonly formation: string = `AWSTemplateFormatVersion: 2010-09-09
|
||||
Description: >-
|
||||
AWS Fargate cluster that can span public and private subnets. Supports public
|
||||
facing load balancers, private internal load balancers, and both internal and
|
||||
external service discovery namespaces.
|
||||
Description: ${TaskDefinitionFormation.description}
|
||||
Parameters:
|
||||
EnvironmentName:
|
||||
Type: String
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { CliFunction } from '../../../../cli/cli-functions-repository';
|
|||
import Input from '../../../../input';
|
||||
import CloudRunnerLogger from '../../../services/cloud-runner-logger';
|
||||
import { BaseStackFormation } from '../cloud-formations/base-stack-formation';
|
||||
import { TaskDefinitionFormation } from '../cloud-formations/task-definition-formation';
|
||||
|
||||
export class AwsCliCommands {
|
||||
@CliFunction(`aws-list-all`, `List all resources`)
|
||||
|
|
@ -18,7 +19,8 @@ export class AwsCliCommands {
|
|||
const stacks =
|
||||
(await CF.listStacks().promise()).StackSummaries?.filter(
|
||||
(_x) =>
|
||||
_x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription !== BaseStackFormation.baseStackDecription,
|
||||
_x.StackStatus !== 'DELETE_COMPLETE' &&
|
||||
_x.TemplateDescription === TaskDefinitionFormation.description.replace('\n', ''),
|
||||
) || [];
|
||||
CloudRunnerLogger.log(`Stacks ${stacks.length}`);
|
||||
for (const element of stacks) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue