fix
parent
1aa8a9a9b1
commit
8542ed8985
|
|
@ -1050,7 +1050,7 @@ class AWSBuildEnvironment {
|
|||
Parameters: parameters,
|
||||
Capabilities: ['CAPABILITY_IAM'],
|
||||
};
|
||||
const stacks = (_a = (yield CF.listStacks().promise()).StackSummaries) === null || _a === void 0 ? void 0 : _a.map((x) => x.StackName);
|
||||
const stacks = (_a = (yield CF.listStacks({ StackStatusFilter: ['UPDATE_COMPLETE', 'CREATE_COMPLETE'] }).promise()).StackSummaries) === null || _a === void 0 ? void 0 : _a.map((x) => x.StackName);
|
||||
const stackExists = (stacks === null || stacks === void 0 ? void 0 : stacks.includes(baseStackName)) || false;
|
||||
const describeStack = () => __awaiter(this, void 0, void 0, function* () {
|
||||
return yield CF.describeStacks(describeStackInput).promise();
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -258,14 +258,16 @@ class AWSBuildEnvironment implements RemoteBuilderProviderInterface {
|
|||
Capabilities: ['CAPABILITY_IAM'],
|
||||
};
|
||||
|
||||
const stacks = (await CF.listStacks().promise()).StackSummaries?.map((x) => x.StackName);
|
||||
const stacks = (
|
||||
await CF.listStacks({ StackStatusFilter: ['UPDATE_COMPLETE', 'CREATE_COMPLETE'] }).promise()
|
||||
).StackSummaries?.map((x) => x.StackName);
|
||||
const stackExists: Boolean = stacks?.includes(baseStackName) || false;
|
||||
const describeStack = async () => {
|
||||
return await CF.describeStacks(describeStackInput).promise();
|
||||
};
|
||||
|
||||
if (!stackExists) {
|
||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks, undefined, 4)})`);
|
||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
||||
await CF.createStack(createStackInput).promise();
|
||||
core.info(`created stack (version: ${hash})`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue