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
textquery string
gitHubTokenFromSecretsManager and notification is optional
Only badge
new CodePipelineBadgeNotification(stack, 'CodePipelineBadgeNotification', {
pipelineArn: pipeline.pipelineArn,
});
Release files for cdk-codepipeline-badge-notification 2.0.78
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cdk-codepipeline-badge-notification-2.0.78.tar.gz | 52.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cdk_codepipeline_badge_notification-2.0.78-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 103.8 kB
Release files / cdk-codepipeline-badge-notification-2.0.78.tar.gz
| Download URL | cdk-codepipeline-badge-notification-2.0.78.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4027dd09350b39d84ae2499d7a072906ffebb0cee0ade0e1fe248519089a2c73
|
|
BLAKE2b-256 checksum How to use checksums |
9e3792dfa6ecc8fd12d8d2c5da39e320843c8d6ab72b2e76653d1aaf17a1a099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / cdk_codepipeline_badge_notification-2.0.78-py3-none-any.whl
| Download URL | cdk_codepipeline_badge_notification-2.0.78-py3-none-any.whl |
|---|---|
| Size | 51.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
807068d17ae37e0bcc4e892854d9ec00e8b5d1fb88eb5e88436210eb0519e7e6
|
|
BLAKE2b-256 checksum How to use checksums |
37209e58fffb0164b8e8013502cf2253750563eb2e50efe1fae65b703247d7d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|