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* () {
|
const describeStack = () => __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield CF.describeStacks(describeStackInput).promise();
|
return yield CF.describeStacks(describeStackInput).promise();
|
||||||
});
|
});
|
||||||
|
try {
|
||||||
if (!stackExists) {
|
if (!stackExists) {
|
||||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
||||||
yield CF.createStack(createStackInput).promise();
|
yield CF.createStack(createStackInput).promise();
|
||||||
|
|
@ -612,6 +613,11 @@ class AWSBuildEnvironment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.info('base stack is ready');
|
core.info('base stack is ready');
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.error(JSON.stringify(yield describeStack(), undefined, 4));
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
handleStackCreationFailure(error, CF, taskDefStackName, taskDefCloudFormation, secrets) {
|
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 () => {
|
const describeStack = async () => {
|
||||||
return await CF.describeStacks(describeStackInput).promise();
|
return await CF.describeStacks(describeStackInput).promise();
|
||||||
};
|
};
|
||||||
|
try {
|
||||||
if (!stackExists) {
|
if (!stackExists) {
|
||||||
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
core.info(`${baseStackName} stack does not exist (${JSON.stringify(stacks)})`);
|
||||||
await CF.createStack(createStackInput).promise();
|
await CF.createStack(createStackInput).promise();
|
||||||
|
|
@ -326,6 +326,10 @@ class AWSBuildEnvironment implements CloudRunnerProviderInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.info('base stack is ready');
|
core.info('base stack is ready');
|
||||||
|
} catch (error) {
|
||||||
|
core.error(JSON.stringify(await describeStack(), undefined, 4));
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleStackCreationFailure(
|
async handleStackCreationFailure(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue