GitHubEnterpriseSourceProps
- class aws_cdk.aws_codebuild.GitHubEnterpriseSourceProps(*, identifier=None, https_clone_url, branch_or_ref=None, build_status_context=None, build_status_url=None, clone_depth=None, fetch_submodules=None, ignore_ssl_errors=None, report_build_status=None, webhook=None, webhook_filters=None, webhook_triggers_batch_build=None)
Bases:
SourceProps
Construction properties for
GitHubEnterpriseSource
.- Parameters:
identifier (
Optional
[str
]) – The source identifier. This property is required on secondary sources.https_clone_url (
str
) – The HTTPS URL of the repository in your GitHub Enterprise installation.branch_or_ref (
Optional
[str
]) – 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 usedbuild_status_context (
Optional
[str
]) – This parameter is used for thecontext
parameter in the GitHub commit status. Can use built-in CodeBuild variables, like $AWS_REGION. Default: “AWS CodeBuild $AWS_REGION ($PROJECT_NAME)”build_status_url (
Optional
[str
]) – The URL that the build will report back to the source provider. Can use built-in CodeBuild variables, like $AWS_REGION. Default: - link to the AWS Console for CodeBuild to a particular build executionclone_depth (
Union
[int
,float
,None
]) – 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.fetch_submodules (
Optional
[bool
]) – Whether to fetch submodules while cloning git repo. Default: falseignore_ssl_errors (
Optional
[bool
]) – Whether to ignore SSL errors when connecting to the repository. Default: falsereport_build_status (
Optional
[bool
]) – Whether to send notifications on your build’s start and end. Default: truewebhook (
Optional
[bool
]) – Whether to create a webhook that will trigger a build every time an event happens in the repository. Default: true if anywebhookFilters
were provided, false otherwisewebhook_filters (
Optional
[Sequence
[FilterGroup
]]) – A list of webhook filters that can constraint what events in the repository will trigger a build. A build is triggered if any of the provided filter groups match. Only valid ifwebhook
was not provided as false. Default: every push and every Pull Request (create or update) triggers a buildwebhook_triggers_batch_build (
Optional
[bool
]) – Trigger a batch build from a webhook instead of a standard one. Enabling this will enable batch builds on the CodeBuild project. Default: false
- ExampleMetadata:
infused
Example:
codebuild.Project(self, "Project", source=codebuild.Source.git_hub_enterprise( https_clone_url="https://my-github-enterprise.com/owner/repo" ), # Enable Docker AND custom caching cache=codebuild.Cache.local(codebuild.LocalCacheMode.DOCKER_LAYER, codebuild.LocalCacheMode.CUSTOM), # BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can # also come from 'buildspec.yml' in your source. build_spec=codebuild.BuildSpec.from_object({ "version": "0.2", "phases": { "build": { "commands": ["..."] } }, "cache": { "paths": ["/root/cachedir/**/*" ] } }) )
Attributes
- branch_or_ref
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:
"mybranch"
- build_status_context
This parameter is used for the
context
parameter in the GitHub commit status.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
Example:
"My build #$CODEBUILD_BUILD_NUMBER"
- build_status_url
The URL that the build will report back to the source provider.
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
Example:
"$CODEBUILD_PUBLIC_BUILD_URL"
- clone_depth
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.
- fetch_submodules
Whether to fetch submodules while cloning git repo.
- Default:
false
- https_clone_url
The HTTPS URL of the repository in your GitHub Enterprise installation.
- identifier
The source identifier.
This property is required on secondary sources.
- ignore_ssl_errors
Whether to ignore SSL errors when connecting to the repository.
- Default:
false
- report_build_status
Whether to send notifications on your build’s start and end.
- Default:
true
- webhook
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
- webhook_filters
A list of webhook filters that can constraint what events in the repository will trigger a build.
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
- webhook_triggers_batch_build
Trigger a batch build from a webhook instead of a standard one.
Enabling this will enable batch builds on the CodeBuild project.
- Default:
false