Skip to content
v2.274.0

BitBucketSourceProps Struct ​

Construction properties for BitBucketSource.

Example ​

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

Properties ​

branchOrRefstringbranch_or_refstrbranchOrRefStringBranchOrRefstringBranchOrRef*string#
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: the default branch's HEAD commit ID is used

example
ts
'mybranch'
buildStatusNamestringbuild_status_namestrbuildStatusNameStringBuildStatusNamestringBuildStatusName*string#
This parameter is used for the `name` parameter in the Bitbucket commit status.

Default: "AWS CodeBuild AWSREGION(PROJECT_NAME)"

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

example
ts
"My build #$CODEBUILD_BUILD_NUMBER"
buildStatusUrlstringbuild_status_urlstrbuildStatusUrlStringBuildStatusUrlstringBuildStatusUrl*string#
The URL that the build will report back to the source provider.

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

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

example
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#
Whether to create a webhook that will trigger a build every time an event happens in the repository.

Default: true if any webhookFilters were provided, false otherwise

webhookFiltersFilterGroup[]webhook_filterstyping.List[FilterGroup]webhookFiltersList<FilterGroup>WebhookFiltersFilterGroup[]WebhookFilters*[]FilterGroup#
A list of webhook filters that can constraint what events in the repository will trigger a build.

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

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

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.