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
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-1.0.45.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a8f620de8521cd7c9898db547191a7e69e2d642077b322ebe8cdc488e23aee |
|
MD5 | 07ceaf07c3ea8c948bd2f4c0a1c4f4d5 |
|
BLAKE2b-256 | 07900bb93ccfe1367679ea2496ffcd1e51bd737eaef28c1da8de38dddb076032 |
Close
Hashes for cdk_codepipeline_badge_notification-1.0.45-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6297ed1cbc0c95c4ad72992754d6550fac1ed4067d8741c832f2c9cf3127cdd9 |
|
MD5 | 08dba42819baa3b24a65949c4a30cd5d |
|
BLAKE2b-256 | da460bd2bf14c32f481c71da9aaf3c561ff37b89c31150e3c75a33ca4d35f4b1 |