Show / Hide Table of Contents

Interface IGitHubEnterpriseSourceProps

Construction properties for GitHubEnterpriseSource.

Inherited Members
ISourceProps.Identifier
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGitHubEnterpriseSourceProps : ISourceProps
Syntax (vb)
Public Interface IGitHubEnterpriseSourceProps Inherits ISourceProps
Remarks

ExampleMetadata: infused

Examples
new Project(this, "Project", new ProjectProps {
                Source = Source.GitHubEnterprise(new GitHubEnterpriseSourceProps {
                    HttpsCloneUrl = "https://my-github-enterprise.com/owner/repo"
                }),

                // Enable Docker AND custom caching
                Cache = Cache.Local(LocalCacheMode.DOCKER_LAYER, LocalCacheMode.CUSTOM),

                // BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can
                // also come from 'buildspec.yml' in your source.
                BuildSpec = BuildSpec.FromObject(new Dictionary<string, object> {
                    { "version", "0.2" },
                    { "phases", new Dictionary<string, IDictionary<string, string[]>> {
                        { "build", new Struct {
                            Commands = new [] { "..." }
                        } }
                    } },
                    { "cache", new Dictionary<string, string[]> {
                        { "paths", new [] { "/root/cachedir/**/*" } }
                    } }
                })
            });

Synopsis

Properties

BranchOrRef

The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

BuildStatusContext

This parameter is used for the context parameter in the GitHub commit status.

BuildStatusUrl

The URL that the build will report back to the source provider.

CloneDepth

The depth of history to download.

FetchSubmodules

Whether to fetch submodules while cloning git repo.

HttpsCloneUrl

The HTTPS URL of the repository in your GitHub Enterprise installation.

IgnoreSslErrors

Whether to ignore SSL errors when connecting to the repository.

ReportBuildStatus

Whether to send notifications on your build's start and end.

Webhook

Whether to create a webhook that will trigger a build every time an event happens in the repository.

WebhookFilters

A list of webhook filters that can constraint what events in the repository will trigger a build.

WebhookTriggersBatchBuild

Trigger a batch build from a webhook instead of a standard one.

Properties

BranchOrRef

The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

string? BranchOrRef { get; }
Property Value

string

Remarks

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

Examples
"mybranch";

BuildStatusContext

This parameter is used for the context parameter in the GitHub commit status.

string? BuildStatusContext { get; }
Property Value

string

Remarks

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

Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)"

See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html

Examples
"My build #$CODEBUILD_BUILD_NUMBER";

BuildStatusUrl

The URL that the build will report back to the source provider.

string? BuildStatusUrl { get; }
Property Value

string

Remarks

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

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

See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html

Examples
"$CODEBUILD_PUBLIC_BUILD_URL";

CloneDepth

The depth of history to download.

double? CloneDepth { get; }
Property Value

double?

Remarks

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.

FetchSubmodules

Whether to fetch submodules while cloning git repo.

bool? FetchSubmodules { get; }
Property Value

bool?

Remarks

Default: false

HttpsCloneUrl

The HTTPS URL of the repository in your GitHub Enterprise installation.

string HttpsCloneUrl { get; }
Property Value

string

Remarks

ExampleMetadata: infused

IgnoreSslErrors

Whether to ignore SSL errors when connecting to the repository.

bool? IgnoreSslErrors { get; }
Property Value

bool?

Remarks

Default: false

ReportBuildStatus

Whether to send notifications on your build's start and end.

bool? ReportBuildStatus { get; }
Property Value

bool?

Remarks

Default: true

Webhook

Whether to create a webhook that will trigger a build every time an event happens in the repository.

bool? Webhook { get; }
Property Value

bool?

Remarks

Default: true if any webhookFilters were provided, false otherwise

WebhookFilters

A list of webhook filters that can constraint what events in the repository will trigger a build.

FilterGroup[]? WebhookFilters { get; }
Property Value

FilterGroup[]

Remarks

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

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

WebhookTriggersBatchBuild

Trigger a batch build from a webhook instead of a standard one.

bool? WebhookTriggersBatchBuild { get; }
Property Value

bool?

Remarks

Enabling this will enable batch builds on the CodeBuild project.

Default: false

Back to top Generated by DocFX