Class GitHubSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.GitHubSourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GitHubSourceProps>
- Enclosing interface:
GitHubSourceProps
@Stability(Stable)
public static final class GitHubSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<GitHubSourceProps>
A builder for
GitHubSourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbranchOrRef
(String branchOrRef) Sets the value ofGitHubSourceProps.getBranchOrRef()
build()
Builds the configured instance.buildStatusContext
(String buildStatusContext) Sets the value ofGitHubSourceProps.getBuildStatusContext()
buildStatusUrl
(String buildStatusUrl) Sets the value ofGitHubSourceProps.getBuildStatusUrl()
cloneDepth
(Number cloneDepth) Sets the value ofGitHubSourceProps.getCloneDepth()
fetchSubmodules
(Boolean fetchSubmodules) Sets the value ofGitHubSourceProps.getFetchSubmodules()
identifier
(String identifier) Sets the value ofSourceProps.getIdentifier()
Sets the value ofGitHubSourceProps.getOwner()
Sets the value ofGitHubSourceProps.getRepo()
reportBuildStatus
(Boolean reportBuildStatus) Sets the value ofGitHubSourceProps.getReportBuildStatus()
Sets the value ofGitHubSourceProps.getWebhook()
webhookFilters
(List<? extends FilterGroup> webhookFilters) Sets the value ofGitHubSourceProps.getWebhookFilters()
webhookTriggersBatchBuild
(Boolean webhookTriggersBatchBuild) Sets the value ofGitHubSourceProps.getWebhookTriggersBatchBuild()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
owner
Sets the value ofGitHubSourceProps.getOwner()
- Parameters:
owner
- The GitHub Organization/user that owns the repo. This parameter is required.- Returns:
this
-
branchOrRef
Sets the value ofGitHubSourceProps.getBranchOrRef()
- Parameters:
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.- Returns:
this
-
buildStatusContext
Sets the value ofGitHubSourceProps.getBuildStatusContext()
- Parameters:
buildStatusContext
- This parameter is used for thecontext
parameter in the GitHub commit status. Can use built-in CodeBuild variables, like $AWS_REGION.- Returns:
this
-
buildStatusUrl
Sets the value ofGitHubSourceProps.getBuildStatusUrl()
- Parameters:
buildStatusUrl
- The URL that the build will report back to the source provider. Can use built-in CodeBuild variables, like $AWS_REGION.- Returns:
this
-
cloneDepth
Sets the value ofGitHubSourceProps.getCloneDepth()
- Parameters:
cloneDepth
- 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.- Returns:
this
-
fetchSubmodules
Sets the value ofGitHubSourceProps.getFetchSubmodules()
- Parameters:
fetchSubmodules
- Whether to fetch submodules while cloning git repo.- Returns:
this
-
repo
Sets the value ofGitHubSourceProps.getRepo()
- Parameters:
repo
- The name of the repo (without the username).- Returns:
this
-
reportBuildStatus
Sets the value ofGitHubSourceProps.getReportBuildStatus()
- Parameters:
reportBuildStatus
- Whether to send notifications on your build's start and end.- Returns:
this
-
webhook
Sets the value ofGitHubSourceProps.getWebhook()
- Parameters:
webhook
- Whether to create a webhook that will trigger a build every time an event happens in the repository.- Returns:
this
-
webhookFilters
@Stability(Stable) public GitHubSourceProps.Builder webhookFilters(List<? extends FilterGroup> webhookFilters) Sets the value ofGitHubSourceProps.getWebhookFilters()
- Parameters:
webhookFilters
- 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.- Returns:
this
-
webhookTriggersBatchBuild
@Stability(Stable) public GitHubSourceProps.Builder webhookTriggersBatchBuild(Boolean webhookTriggersBatchBuild) Sets the value ofGitHubSourceProps.getWebhookTriggersBatchBuild()
- Parameters:
webhookTriggersBatchBuild
- Trigger a batch build from a webhook instead of a standard one. Enabling this will enable batch builds on the CodeBuild project.- Returns:
this
-
identifier
Sets the value ofSourceProps.getIdentifier()
- Parameters:
identifier
- The source identifier. This property is required on secondary sources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GitHubSourceProps>
- Returns:
- a new instance of
GitHubSourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-