Fixing aws base stack setup error handling
parent
a0593807c4
commit
f5e6599266
|
|
@ -580,6 +580,7 @@ class AWSBuildEnvironment {
|
|||
const describeStack = () => __awaiter(this, void 0, void 0, function* () {
|
||||
return yield CF.describeStacks(describeStackInput).promise();
|
||||
});
|
||||
try {
|
||||
if (!stackExists) {
|
||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
||||
yield CF.createStack(createStackInput).promise();
|
||||
|
|
@ -612,6 +613,11 @@ class AWSBuildEnvironment {
|
|||
}
|
||||
}
|
||||
core.info('base stack is ready');
|
||||
}
|
||||
catch (error) {
|
||||
core.error(JSON.stringify(yield describeStack(), undefined, 4));
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
}
|
||||
handleStackCreationFailure(error, CF, taskDefStackName, taskDefCloudFormation, secrets) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -290,7 +290,7 @@ class AWSBuildEnvironment implements CloudRunnerProviderInterface {
|
|||
const describeStack = async () => {
|
||||
return await CF.describeStacks(describeStackInput).promise();
|
||||
};
|
||||
|
||||
try {
|
||||
if (!stackExists) {
|
||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
||||
await CF.createStack(createStackInput).promise();
|
||||
|
|
@ -326,6 +326,10 @@ class AWSBuildEnvironment implements CloudRunnerProviderInterface {
|
|||
}
|
||||
}
|
||||
core.info('base stack is ready');
|
||||
} catch (error) {
|
||||
core.error(JSON.stringify(await describeStack(), undefined, 4));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async handleStackCreationFailure(
|
||||
|
|
|
|||
Loading…
Reference in New Issue