try/catch aws logging errors

pull/218/head
Frostebite 2021-02-05 23:49:14 +00:00
parent cbb6a9c8b8
commit eb1d5c995d
2 changed files with 7 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -112,12 +112,13 @@ class AWS {
core.info(`Build job is running, `); core.info(`Build job is running, `);
// watching logs // watching logs
const source = new hose.Source({
LogGroup: baseResources.StackResources.find((x) => x.LogicalResourceId === 'LogGroup'),
aws: { region: SDK.config.region },
});
try { try {
const source = new hose.Source({
LogGroup: baseResources.StackResources.find((x) => x.LogicalResourceId === 'LogGroup'),
aws: SDK.config,
});
source.on('logs', AWS.onlog); source.on('logs', AWS.onlog);
source.on('error', (error) => { source.on('error', (error) => {
@ -126,7 +127,7 @@ class AWS {
source.open(); source.open();
} catch (error) { } catch (error) {
core.error(error); core.info(error);
} }
await ECS.waitFor('tasksStopped', { await ECS.waitFor('tasksStopped', {