Skip to content
v2.273.0

BitBucketSourceProps Struct ​

Construction properties for BitBucketSource.

Example ​

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

Properties ​

branchOrRefstringbranch_or_refstrbranchOrRefStringBranchOrRefstringBranchOrRef*string= the default branch's HEAD commit…#
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.
default · example

Default: the default branch's HEAD commit ID is used

ts
'mybranch'
buildStatusNamestringbuild_status_namestrbuildStatusNameStringBuildStatusNamestringBuildStatusName*string= "AWS CodeBuild $AWS_REGION ($PRO…#
This parameter is used for the `name` parameter in the Bitbucket commit status.

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

default · example

Default: "AWS CodeBuild AWSREGION(PROJECT_NAME)"

ts
"My build #$CODEBUILD_BUILD_NUMBER"
buildStatusUrlstringbuild_status_urlstrbuildStatusUrlStringBuildStatusUrlstringBuildStatusUrl*string= link to the AWS Console for Code…#
The URL that the build will report back to the source provider.

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

default · example

Default: link to the AWS Console for CodeBuild to a particular build execution

ts
"$CODEBUILD_PUBLIC_BUILD_URL"
cloneDepthnumberclone_depthint | floatcloneDepthNumberCloneDepthdoubleCloneDepth*float64#
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.

fetchSubmodulesbooleanfetch_submodulesboolfetchSubmodulesBooleanFetchSubmodulesboolFetchSubmodules*bool= false#
Whether to fetch submodules while cloning git repo.
identifierstringidentifierstridentifierStringIdentifierstringIdentifier*string#
The source identifier.

This property is required on secondary sources.

ownerstringownerstrownerStringOwnerstringOwner*stringrequired#
The BitBucket account/user that owns the repo.
example
ts
'awslabs'
repostringrepostrrepoStringRepostringRepo*stringrequired#
The name of the repo (without the username).
example
ts
'aws-cdk'
reportBuildStatusbooleanreport_build_statusboolreportBuildStatusBooleanReportBuildStatusboolReportBuildStatus*bool= true#
Whether to send notifications on your build's start and end.
webhookbooleanwebhookboolwebhookBooleanWebhookboolWebhook*bool= true if any `webhookFilters` wer…#
Whether to create a webhook that will trigger a build every time an event happens in the repository.
default

Default: true if any webhookFilters were provided, false otherwise

webhookFiltersFilterGroup[]webhook_filterstyping.List[FilterGroup]webhookFiltersList<FilterGroup>WebhookFiltersFilterGroup[]WebhookFilters*[]FilterGroup= every push and every Pull Reques…#
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.

default

Default: every push and every Pull Request (create or update) triggers a build

webhookTriggersBatchBuildbooleanwebhook_triggers_batch_buildboolwebhookTriggersBatchBuildBooleanWebhookTriggersBatchBuildboolWebhookTriggersBatchBuild*bool= false#
Trigger a batch build from a webhook instead of a standard one.

Enabling this will enable batch builds on the CodeBuild project.