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.30.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c57b5d59686689cda62457c212a88246c704e5bd24d0665653f5fe1e5122ca9 |
|
MD5 | 8e01cafe8529cd20e4ce2cc93824b1b1 |
|
BLAKE2b-256 | 3cd7492545ca3ec8bf24ea84e1812185087e3035a04a42d4551c25c01d9c78c0 |
Close
Hashes for aws_cdk.aws_codecommit-0.30.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc03bddc5d731884b424123bdac58bdc25259cb2534867982a56a09bff50283 |
|
MD5 | 89c03477d2de95a4f7a2cf95cf218804 |
|
BLAKE2b-256 | e3dfe669fc22371b8f3c320355317a2f38faa9d787030240c6b1ff20b8940402 |