aws-cdk-lib.aws_codebuild.CodeCommitSourceProps

interface CodeCommitSourceProps

LanguageType name
.NETAmazon.CDK.AWS.CodeBuild.CodeCommitSourceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#CodeCommitSourceProps
Javasoftware.amazon.awscdk.services.codebuild.CodeCommitSourceProps
Pythonaws_cdk.aws_codebuild.CodeCommitSourceProps
TypeScript (source)aws-cdk-lib » aws_codebuild » CodeCommitSourceProps

Construction properties for CodeCommitSource.

Example

import * as codecommit from 'aws-cdk-lib/aws-codecommit';
declare const repo: codecommit.Repository;
declare const bucket: s3.Bucket;

const project = new codebuild.Project(this, 'MyProject', {
  secondarySources: [
    codebuild.Source.codeCommit({
      identifier: 'source2',
      repository: repo,
    }),
  ],
  secondaryArtifacts: [
    codebuild.Artifacts.s3({
      identifier: 'artifact2',
      bucket: bucket,
      path: 'some/path',
      name: 'file.zip',
    }),
  ],
  // ...
});

Properties

NameTypeDescription
repositoryIRepository
branchOrRef?stringThe commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.
cloneDepth?numberThe depth of history to download.
fetchSubmodules?booleanWhether to fetch submodules while cloning git repo.
identifier?stringThe source identifier.

repository

Type: IRepository


branchOrRef?

Type: string (optional, default: the default branch's HEAD commit ID is used)

The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. Example

'mybranch'

cloneDepth?

Type: number (optional)

The depth of history to download.

Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build of the project.


fetchSubmodules?

Type: boolean (optional, default: false)

Whether to fetch submodules while cloning git repo.


identifier?

Type: string (optional)

The source identifier.

This property is required on secondary sources.