try/catch aws logging errors
parent
cbb6a9c8b8
commit
eb1d5c995d
File diff suppressed because one or more lines are too long
|
|
@ -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', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue