Log describe AWS tasks upon non success exit code

pull/289/head
Frostebite 2021-08-13 20:18:59 +01:00
parent ac4669ba73
commit 33a1fb743b
3 changed files with 15 additions and 3 deletions

5
dist/index.js vendored
View File

@ -1221,7 +1221,10 @@ class AWSBuildRunner {
}).promise()).tasks) === null || _r === void 0 ? void 0 : _r[0].containers) === null || _s === void 0 ? void 0 : _s[0].exitCode;
if (exitCode !== 0) {
core.error(`job failed with exit code ${exitCode}`);
throw new Error(`job failed with exit code ${exitCode}`);
throw new Error(`job failed with exit code ${exitCode} ${JSON.stringify(yield ECS.describeTasks({
tasks: [taskArn],
cluster,
}).promise(), undefined, 4)}`);
}
else {
core.info(`Task has finished successfully`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,16 @@ class AWSBuildRunner {
).tasks?.[0].containers?.[0].exitCode;
if (exitCode !== 0) {
core.error(`job failed with exit code ${exitCode}`);
throw new Error(`job failed with exit code ${exitCode}`);
throw new Error(
`job failed with exit code ${exitCode} ${JSON.stringify(
await ECS.describeTasks({
tasks: [taskArn],
cluster,
}).promise(),
undefined,
4,
)}`,
);
} else {
core.info(`Task has finished successfully`);
}