class Source
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeBuild.Source |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#Source |
Java | software.amazon.awscdk.services.codebuild.Source |
Python | aws_cdk.aws_codebuild.Source |
TypeScript (source) | aws-cdk-lib » aws_codebuild » Source |
Implements
ISource
Source provider definition for a CodeBuild Project.
Example
const project = new codebuild.Project(this, 'MyProject', {
buildSpec: codebuild.BuildSpec.fromSourceFilename('my-buildspec.yml'),
source: codebuild.Source.gitHub({
owner: 'awslabs',
repo: 'aws-cdk',
})
});
Initializer (protected)
super(props: SourceProps)
Parameters
- props
Source
Props
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.
Bucket(props)
static bitpublic static bitBucket(props: BitBucketSourceProps): ISource
Parameters
- props
Bit
Bucket Source Props
Returns
Commit(props)
static codepublic static codeCommit(props: CodeCommitSourceProps): ISource
Parameters
- props
Code
Commit Source Props
Returns
Hub(props)
static gitpublic static gitHub(props: GitHubSourceProps): ISource
Parameters
- props
Git
Hub Source Props
Returns
HubEnterprise(props)
static gitpublic static gitHubEnterprise(props: GitHubEnterpriseSourceProps): ISource
Parameters
Returns
static s3(props)
public static s3(props: S3SourceProps): ISource
Parameters
- props
S3
Source Props
Returns