aws-cdk-lib.aws_codebuild.Source

class Source

LanguageType name
.NETAmazon.CDK.AWS.CodeBuild.Source
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#Source
Javasoftware.amazon.awscdk.services.codebuild.Source
Pythonaws_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 SourceProps

Properties

NameTypeDescription
badgeSupportedboolean
typestring
identifier?string

badgeSupported

Type: boolean


type

Type: string


identifier?

Type: string (optional)

Methods

NameDescription
bind(_scope, _project)Called by the project when the source is added so that the source can perform binding operations on the source.
static bitBucket(props)
static codeCommit(props)
static gitHub(props)
static gitHubEnterprise(props)
static s3(props)

bind(_scope, _project)

public bind(_scope: Construct, _project: IProject): SourceConfig

Parameters

  • _scope Construct
  • _project IProject

Returns

  • SourceConfig

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 BitBucketSourceProps

Returns

  • ISource

static codeCommit(props)

public static codeCommit(props: CodeCommitSourceProps): ISource

Parameters

  • props CodeCommitSourceProps

Returns

  • ISource

static gitHub(props)

public static gitHub(props: GitHubSourceProps): ISource

Parameters

  • props GitHubSourceProps

Returns

  • ISource

static gitHubEnterprise(props)

public static gitHubEnterprise(props: GitHubEnterpriseSourceProps): ISource

Parameters

  • props GitHubEnterpriseSourceProps

Returns

  • ISource

static s3(props)

public static s3(props: S3SourceProps): ISource

Parameters

  • props S3SourceProps

Returns

  • ISource