CDK Constructs for AWS CodeCommit
Project description
AWS CodeCommit Construct Library
This is a developer preview (public beta) module. Releases might lack important features and might have future breaking changes.
This API is still under active development and subject to non-backward compatible changes or removal in any future version. Use of the API is not recommended in production environments. Experimental APIs are not subject to the Semantic Versioning model.
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
Hashes for aws-cdk.aws-codecommit-0.35.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e7a31b1d2c94ab152a630bdd6ddcdc389eb2ed8d076eb6ebed40a0f5adc9e28 |
|
MD5 | 8589e798f24c57c36ffb9117610a2a2c |
|
BLAKE2b-256 | 8b6e3c032b7dbc5bf74ffd7b574e7ce2d8c8e466060cab3b5c7eae71bf235daf |
Hashes for aws_cdk.aws_codecommit-0.35.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b4922fa923ab2390571ef75aa502a5c0c90cdb39e1697c9110da2f9c4375a8 |
|
MD5 | d4cc607da44592ba414d3453573932a2 |
|
BLAKE2b-256 | a74522dc4fa6b404600db69004a2dfc4a536d97eb0e9da8eb32ec77457dc7713 |