Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make exit discord message consistent with others #105

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ci/ci.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
export RUN_ID=$(node generate-id.js)
echo "INFO: Run id: $RUN_ID"
echo "INFO: Sleep seconds set for services to start: ${SLEEP:=60}" # defaults to 60 seconds

if [[ $NODE_ENV == "local_client-public" ]]; then
Expand Down
11 changes: 0 additions & 11 deletions ci/generate-id.js

This file was deleted.

24 changes: 16 additions & 8 deletions ci/report-exit.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
import { generateDiscordCloudwatchLogUrl, listECSTasks, sendDiscordNotification, getCommitHashes } from './helpers.js';
import {
getThisTaskArn,
generateDiscordCloudwatchLogUrl,
getCommitHashes,
sendDiscordNotification
} from './helpers.js';

const main = async () => {
try {
const taskArns = await listECSTasks()
const taskArn = getThisTaskArn()
console.log('INFO: taskArn:=', taskArn)
const commitHashes = await getCommitHashes() // e.g. "ceramic-anchor-service (333fc9afb59a) <==> go-ipfs-daemon (6871b7dcd27d)\n"
console.log('INFO: listECSTasks taskArns:=', taskArns)
let logUrls = generateDiscordCloudwatchLogUrl()
if (logUrls.length < 1) {
logUrls = ["No log Urls found"]

let logUrl = generateDiscordCloudwatchLogUrl(taskArn)
if (logUrl == '') {
logUrl = 'No log URL found'
} else {
logUrl = `[Cloudwatch logs for task ${taskArn}](${logUrl})`
}

const message = [
{
title: 'Tests Exited',
description: `Run Id: ${process.env.RUN_ID}`,
description: `Run Id: ${taskArn}`,
color: 16711712,
fields: [
{
Expand All @@ -26,7 +34,7 @@ const main = async () => {
},
{
name: 'Logs',
value: `${logUrls}`,
value: `${logUrl}`,
}
],
},
Expand Down
16 changes: 1 addition & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"ts-jest": "^28.0.8",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"typestub-multihashes": "^0.0.4",
"unique-names-generator": "^4.7.1"
"typestub-multihashes": "^0.0.4"
}
}