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.67.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 201f40a661195e7182bab2cf7a7d8ff31a2e93ceb9a148eba0fbc6884c9edc98 |
|
MD5 | 4a1571e5db46225c82dce14b258c3ffb |
|
BLAKE2b-256 | b214f914bc1192f0233ee011cd61f479053683e9296bafbb0857452f92de0899 |
Close
Hashes for cdk_codepipeline_badge_notification-2.0.67-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50a56cefe6123594511878dd73036b9ca85bcdf70f33f07bd4f88634a9ba0901 |
|
MD5 | 1e8ff0b63614869a51b6f104240f6b25 |
|
BLAKE2b-256 | 937ab89b0c0e27bf2d076e70903a5fb3f9c3f0d5da26757be1436ad8b3fd3973 |