class Source
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CodeBuild.Source |
Java | software.amazon.awscdk.services.codebuild.Source |
Python | aws_cdk.aws_codebuild.Source |
TypeScript (source) | @aws-cdk/aws-codebuild » Source |
Implements
ISource
Source provider definition for a CodeBuild Project.
Example
const gitHubSource = codebuild.Source.gitHub({
owner: 'awslabs',
repo: 'aws-cdk',
webhook: true, // optional, default: true if `webhookFilters` were provided, false otherwise
webhookTriggersBatchBuild: true, // optional, default is false
webhookFilters: [
codebuild.FilterGroup
.inEventOf(codebuild.EventAction.PUSH)
.andBranchIs('master')
.andCommitMessageIs('the commit message'),
], // optional, by default all pushes and Pull Requests will trigger a build
});
Initializer (protected)
super(props: SourceProps)
Parameters
- props
SourceProps
Properties
| Name | Type | Description |
|---|---|---|
| badge | boolean | |
| type | string | |
| identifier? | string |
badgeSupported
Type:
boolean
type
Type:
string
identifier?
Type:
string
(optional)
Methods
| Name | Description |
|---|---|
| bind(_scope, _project) | Called by the project when the source is added so that the source can perform binding operations on the source. |
| static bit | |
| static code | |
| static git | |
| static git | |
| static s3(props) |
bind(_scope, _project)
public bind(_scope: Construct, _project: IProject): SourceConfig
Parameters
Returns
Called by the project when the source is added so that the source can perform binding operations on the source.
For example, it can grant permissions to the code build project to read from the S3 bucket.
static bitBucket(props)
public static bitBucket(props: BitBucketSourceProps): ISource
Parameters
- props
BitBucket Source Props
Returns
static codeCommit(props)
public static codeCommit(props: CodeCommitSourceProps): ISource
Parameters
- props
CodeCommit Source Props
Returns
static gitHub(props)
public static gitHub(props: GitHubSourceProps): ISource
Parameters
- props
GitHub Source Props
Returns
static gitHubEnterprise(props)
public static gitHubEnterprise(props: GitHubEnterpriseSourceProps): ISource
Parameters
Returns
static s3(props)
public static s3(props: S3SourceProps): ISource
Parameters
- props
S3Source Props
Returns

.NET
Java
Python
TypeScript (