CDK Constructs for AWS CodeCommit
Project description
AWS CodeCommit
AWS CodeCommit is a version control service that enables you to privately store and manage Git repositories in the AWS cloud.
For further information on CodeCommit, see the AWS CodeCommit documentation.
To add a CodeCommit Repository to your stack:
import codecommit = require('@aws-cdk/aws-codecommit');
const repo = new codecommit.Repository(this, 'Repository' ,{
repositoryName: 'MyRepositoryName',
description: 'Some description.', // optional property
});
To add an Amazon SNS trigger to your repository:
// trigger is established for all repository actions on all branches by default.
repo.notify('arn:aws:sns:*:123456789012:my_topic');
Events
CodeCommit repositories emit Amazon CloudWatch events for certain activities.
Use the repo.onXxx
methods to define rules that trigger on these events
and invoke targets as a result:
// starts a CodeBuild project when a commit is pushed to the "master" branch of the repo
repo.onCommit('CommitToMaster', project, 'master');
// publishes a message to an Amazon SNS topic when a comment is made on a pull request
const rule = repo.onCommentOnPullRequest('CommentOnPullRequest');
rule.addTarget(myTopic);
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 aws-cdk.aws-codecommit-0.29.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6522c5edd2516dac69b12353bca11b2dc8ec687daa79994219a05625fdc50a3b |
|
MD5 | baeb97f17c1af47a845496e4a1e8d08e |
|
BLAKE2b-256 | 57a9c53e4bb379f1183d8f74255dcb0fbc1b3c0f4a036bca1d68c655d89360aa |
Close
Hashes for aws_cdk.aws_codecommit-0.29.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6e955abbe024799dcdadd5699232c2d370f33bf86c98428a2fa4307a9f5c8a3 |
|
MD5 | 3576e8ead31244a0a758bed0c45af62b |
|
BLAKE2b-256 | 5a0496884e7cf4d53ec324af68a95a2460fd29a806b197e1b891b8f18c0ab7d1 |