Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
feat: change slack message
Browse files Browse the repository at this point in the history
  • Loading branch information
arantespp committed Sep 16, 2021
1 parent 303344d commit d27285c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 3 additions & 1 deletion cicd/carlin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as fs from 'fs';

export default {
pipelines: ['main', 'tag'],
pipelines: ['main', 'tag', 'pr'],
slackWebhookUrl:
'https://hooks.slack.com/services/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',
sshKey: './ssh-key',
sshUrl: '[email protected]:ttoss/carlin.git',
taskEnvironment: [
Expand Down
6 changes: 6 additions & 0 deletions cicd/commands/pr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

npx lerna run "build" --stream --parallel
npx lerna run "test" --stream --parallel
20 changes: 15 additions & 5 deletions packages/cli/src/deploy/cicd/lambdas/ecsTaskReport.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,21 @@ export const ecsTaskReportHandler: Handler<Event> = async ({

const webhook = new IncomingWebhook(url);

(async () => {
await webhook.send({
text: "I've got news for you...",
});
})();
await webhook.send({
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `\`\`\`${JSON.stringify({
status,
pipelineName,
logs,
})}\`\`\``,
},
},
],
});
};

await Promise.all([handleApprovalResult(), handleStackNotification()]);
Expand Down

0 comments on commit d27285c

Please sign in to comment.