interface RepositoryProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeCommit.RepositoryProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscodecommit#RepositoryProps |
Java | software.amazon.awscdk.services.codecommit.RepositoryProps |
Python | aws_cdk.aws_codecommit.RepositoryProps |
TypeScript (source) | aws-cdk-lib » aws_codecommit » RepositoryProps |
Example
declare const project: codebuild.PipelineProject;
const repository = new codecommit.Repository(this, 'MyRepository', {
repositoryName: 'MyRepository',
});
const project = new codebuild.PipelineProject(this, 'MyProject');
const sourceOutput = new codepipeline.Artifact();
const sourceAction = new codepipeline_actions.CodeCommitSourceAction({
actionName: 'CodeCommit',
repository,
output: sourceOutput,
});
const buildAction = new codepipeline_actions.CodeBuildAction({
actionName: 'CodeBuild',
project,
input: sourceOutput,
outputs: [new codepipeline.Artifact()], // optional
executeBatchBuild: true, // optional, defaults to false
combineBatchBuildArtifacts: true, // optional, defaults to false
});
new codepipeline.Pipeline(this, 'MyPipeline', {
stages: [
{
stageName: 'Source',
actions: [sourceAction],
},
{
stageName: 'Build',
actions: [buildAction],
},
],
});
Properties
Name | Type | Description |
---|---|---|
repository | string | Name of the repository. |
code? | Code | The contents with which to initialize the repository after it has been created. |
description? | string | A description of the repository. |
kms | IKey | The customer managed key used to encrypt and decrypt the data in repository. |
repositoryName
Type:
string
Name of the repository.
This property is required for all CodeCommit repositories.
code?
Type:
Code
(optional, default: No initialization (create empty repo))
The contents with which to initialize the repository after it has been created.
description?
Type:
string
(optional, default: No description.)
A description of the repository.
Use the description to identify the purpose of the repository.
kmsKey?
Type:
IKey
(optional, default: Use an AWS managed key)
The customer managed key used to encrypt and decrypt the data in repository.