-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update packages and rebuild deps on startup (#231)
* fix: update packages and rebuild deps on startup * fix: add back crash reporting
- Loading branch information
Showing
5 changed files
with
1,842 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { | ||
generateDiscordCloudwatchLogUrl, | ||
listECSTasks, | ||
sendDiscordNotification, | ||
} from './helpers.js' | ||
|
||
const main = async () => { | ||
try { | ||
const taskArns = await listECSTasks() | ||
console.log('INFO: listECSTasks taskArns:=', taskArns) | ||
let logUrls = generateDiscordCloudwatchLogUrl() | ||
if (logUrls.length < 1) { | ||
logUrls = ['No log Urls found'] | ||
} | ||
|
||
const message = [ | ||
{ | ||
title: 'Tests Exited', | ||
description: `Run Id: ${process.env.RUN_ID}`, | ||
color: 16711712, | ||
fields: [ | ||
{ | ||
name: 'Configuration', | ||
value: `${process.env.NODE_ENV}` | ||
}, | ||
{ | ||
name: 'Logs', | ||
value: `${logUrls}` | ||
} | ||
] | ||
} | ||
] | ||
const data = { embeds: message, username: 'jest-reporter' } | ||
const testFailuresUrl = process.env.DISCORD_WEBHOOK_URL_TEST_FAILURES | ||
const testResultsUrl = process.env.DISCORD_WEBHOOK_URL_TEST_RESULTS | ||
|
||
const retryDelayMs = 300000 // 300k ms = 5 mins | ||
sendDiscordNotification(testFailuresUrl, data, retryDelayMs) | ||
sendDiscordNotification(testResultsUrl, data, retryDelayMs) | ||
} catch (err) { | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.