cdk-codepipeline-badge-notification
Project description
CDK-CodePipeline-Status
Feature
- Generate badge when AWS CodePipeline state change
- Update GitHub commit status when AWS CodePipeline state change
- Slack notification when AWS CodePipeline state change
Usage
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_pipeline_status import CodePipelineStatus
import aws_cdk.core as cdk
import aws_cdk.aws_codepipeline as code_pipeline
app = cdk.App()
env = {
"region": process.env.CDK_DEFAULT_REGION,
"account": process.env.CDK_DEFAULT_ACCOUNT
}
stack = cdk.Stack(app, "codepipeline-status", env=env)
pipeline = code_pipeline.Pipeline(stack, "TestPipeline",
pipeline_name="testCodePipeline",
cross_account_keys=False
)
CodePipelineStatus(stack, "CodePipelineStatus",
pipeline_arn=pipeline.pipeline_arn,
git_hub_token_from_secrets_manager={
"secrets_manager_arn": "arn:aws:secretsmanager:ap-northeast-1:111111111111:secret:codepipeline/lambda/github-token-YWWmII",
"secret_key": "codepipeline/lambda/github-token"
},
notification={
"stage_name": "production",
"slack_web_hook_url": "slack url webhook"
}
)
gitHubTokenFromSecretsManager and notification is optional
Only badge
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
CodePipelineStatus(stack, "CodePipelineStatus",
pipeline_arn=pipeline.pipeline_arn
)
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-0.1.43.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88757f1c05d63cd6749931eee39e59448b3f4dd25c329214e73159c4137d4d83 |
|
MD5 | 000c6f8ee423e8f120668fa09f0d1b9d |
|
BLAKE2b-256 | 1f2498dcce2db6e86080b9cdbb787d26ab63b6051ddff0e09c612cc6de67f18f |
Close
Hashes for cdk_codepipeline_badge_notification-0.1.43-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bfd3eec4180450821c180c04667fd4637d7c65ce747de38d07ec9f0d03b1842 |
|
MD5 | f3576dd548fde6b6637028e0aa7338fc |
|
BLAKE2b-256 | 142b1dc2a625e1b04eacda4add93a67c5c2fe908f2885e710c617a85a0cd1d86 |