cdk-codepipeline-badge-notification
Project description
CDK-CodePipeline-Badge-Notification
Feature
-
Generate badge when AWS CodePipeline state change
-
Update GitHub commit status when AWS CodePipeline state change
-
Notification for chat bot provider
- Slack
- Google Chat
- Telegram
Support CDKv1 and CDKv2
CDKv2
npm install cdk-codepipeline-badge-notification
or
npm install cdk-codepipeline-badge-notification@latest
or
npm install cdk-codepipeline-badge-notification@^2.0.0
CDKv1
npm install cdk-codepipeline-badge-notification@cdkv1
or
npm install cdk-codepipeline-badge-notification@^1.0.6
Usage
import { CodePipelineBadgeNotification } from 'cdk-pipeline-badge-notification';
import * as cdk from '@aws-cdk/core';
import * as codePipeline from '@aws-cdk/aws-codepipeline';
const app = new cdk.App();
const env = {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
};
const stack = new cdk.Stack(app, 'codepipeline-badge-notification', { env });
const pipeline = new codePipeline.Pipeline(stack, 'TestPipeline', {
pipelineName: 'testCodePipeline',
crossAccountKeys: false,
});
new CodePipelineBadgeNotification(stack, 'CodePipelineBadgeNotification', {
pipelineArn: pipeline.pipelineArn,
gitHubTokenFromSecretsManager: {
secretsManagerArn:
'arn:aws:secretsmanager:ap-northeast-1:111111111111:secret:codepipeline/lambda/github-token-YWWmII',
secretKey: 'codepipeline/lambda/github-token',
},
notification: {
stageName: 'production',
ssmSlackWebHookUrl: '/chat/google/slack',
ssmGoogleChatWebHookUrl: '/chat/google/webhook',
ssmTelegramWebHookUrl: '/chat/telegram/webhook',
},
});
:warning: telegram webhook url from ssm parameter which the URL is not include
text
query string
gitHubTokenFromSecretsManager and notification is optional
Only badge
new CodePipelineBadgeNotification(stack, 'CodePipelineBadgeNotification', {
pipelineArn: pipeline.pipelineArn,
});
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cdk-codepipeline-badge-notification-2.0.37.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9e63eb3b4874abfec2f25cd8d9dc54bad0945e17ef59c78f33be0c58c6a2e92 |
|
MD5 | 9916ab533bec0b6cceae65ef965d3b88 |
|
BLAKE2b-256 | 79a857704869482ed03beedc70a13eec4537cff6eef1d898f0d263c258ab409e |
Close
Hashes for cdk_codepipeline_badge_notification-2.0.37-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0bab41292c6ec6ec126d66924fb6ac1250691f11280eeff9c2b5fb7642be23b |
|
MD5 | 0f6b92a0507956dcb7340d0b13809911 |
|
BLAKE2b-256 | 0916e3742b7dd6a7ed94dd7c014fcd1f5ff33ad65d56d27b271777161f9b59be |