aws-cdk-lib.aws_codebuild.BitBucketSourceProps

interface BitBucketSourceProps

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

Construction properties for BitBucketSource.

Example

const bbSource = codebuild.Source.bitBucket({
  owner: 'owner',
  repo: 'repo',
});

Properties

NameTypeDescription
ownerstringThe BitBucket account/user that owns the repo.
repostringThe name of the repo (without the username).
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.
buildStatusName?stringThis parameter is used for the name parameter in the Bitbucket commit status.
buildStatusUrl?stringThe URL that the build will report back to the source provider.
cloneDepth?numberThe depth of history to download.
fetchSubmodules?booleanWhether to fetch submodules while cloning git repo.
identifier?stringThe source identifier.
reportBuildStatus?booleanWhether to send notifications on your build's start and end.
webhook?booleanWhether to create a webhook that will trigger a build every time an event happens in the repository.
webhookFilters?FilterGroup[]A list of webhook filters that can constraint what events in the repository will trigger a build.
webhookTriggersBatchBuild?booleanTrigger a batch build from a webhook instead of a standard one.

owner

Type: string

The BitBucket account/user that owns the repo. Example

'awslabs'

repo

Type: string

The name of the repo (without the username). Example

'aws-cdk'

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'

buildStatusName?

Type: string (optional, default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)")

This parameter is used for the name parameter in the Bitbucket commit status.

Can use built-in CodeBuild variables, like $AWS_REGION.

See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html Example

"My build #$CODEBUILD_BUILD_NUMBER"

buildStatusUrl?

Type: string (optional, default: link to the AWS Console for CodeBuild to a particular build execution)

The URL that the build will report back to the source provider.

Can use built-in CodeBuild variables, like $AWS_REGION.

See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html Example

"$CODEBUILD_PUBLIC_BUILD_URL"

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.


reportBuildStatus?

Type: boolean (optional, default: true)

Whether to send notifications on your build's start and end.


webhook?

Type: boolean (optional, default: true if any webhookFilters were provided, false otherwise)

Whether to create a webhook that will trigger a build every time an event happens in the repository.


webhookFilters?

Type: FilterGroup[] (optional, default: every push and every Pull Request (create or update) triggers a build)

A list of webhook filters that can constraint what events in the repository will trigger a build.

A build is triggered if any of the provided filter groups match. Only valid if webhook was not provided as false.


webhookTriggersBatchBuild?

Type: boolean (optional, default: false)

Trigger a batch build from a webhook instead of a standard one.

Enabling this will enable batch builds on the CodeBuild project.