Class BuildFiltersBuilder
java.lang.Object
org.sourcelab.buildkite.api.client.request.BuildFiltersBuilder
Builder for
BuildFilters.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()New BuildFilters instance using configured properties.withBranch(String branch) Apply filter over one or more branches.withBranches(String... branches) Apply filter over one or more branches.withBranches(Collection<String> branches) Apply filter over one or more branches.withCommit(String commit) Apply filter over one or more commits.withCommits(String... commits) Apply filter over one or more commits.withCommits(Collection<String> commits) Apply filter over one or more commits.withCreatedFrom(ZonedDateTime createdFrom) Apply filter over results by builds created on or after the given time.withCreatedTo(ZonedDateTime createdTo) Filters the results by builds created before the given time.withCreator(String creatorUuid) Filters the results by the user who created the build.withFinishedFrom(ZonedDateTime finishedFrom) Filters the results by builds finished on or after the given time.withIncludeRetriedJobs(Boolean includeRetriedJobs) Setting to TRUE, include all retried job executions in each build's jobs list.withMetaData(String name, Object value) Filters the results by the given meta-data.withMetaData(Map<String, String> metaData) Filters the results by the given meta-data.withOrganization(String orgIdSlug) withPage(int page) Set the page to retrieve.withPageOptions(int page, int perPage) Apply Paging Options.withPageOptions(PageOptions pageOptions) Apply Paging Options.withPerPage(int perPage) Set the number of results per page.withPipeline(String orgIdSlug, String pipelineIdSlug) Filters the results by the given build state.Utility helper to fluently select states from known valid states.withStates(String... states) Filters the results by the given build state.withStates(Collection<String> states) Filters the results by the given build state.
-
Constructor Details
-
BuildFiltersBuilder
public BuildFiltersBuilder()Constructor.
-
-
Method Details
-
withBranch
Apply filter over one or more branches.- Parameters:
branch- Branch names to filter over.- Returns:
- BuildFiltersBuilder for method chaining.
-
withBranches
Apply filter over one or more branches.- Parameters:
branches- One or more branch names to filter by.- Returns:
- BuildFiltersBuilder for method chaining.
-
withBranches
Apply filter over one or more branches.- Parameters:
branches- One or more branch names to filter by.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCommit
Apply filter over one or more commits.- Parameters:
commit- Commit hashes to filter by.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCommits
Apply filter over one or more commits.- Parameters:
commits- One or more commit hashes to filter by.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCommits
Apply filter over one or more commits.- Parameters:
commits- One or more commit hashes to filter by.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCreatedFrom
Apply filter over results by builds created on or after the given time.- Parameters:
createdFrom- Filters the results by builds created on or after the given time.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCreatedTo
Filters the results by builds created before the given time.- Parameters:
createdTo- Filters the results by builds created before the given time.- Returns:
- BuildFiltersBuilder for method chaining.
-
withCreator
Filters the results by the user who created the build. Supply userId/UUID.- Parameters:
creatorUuid- Filters the results by the user who created the build. Supply userId/UUID.- Returns:
- BuildFiltersBuilder for method chaining.
-
withFinishedFrom
Filters the results by builds finished on or after the given time.- Parameters:
finishedFrom- Filters the results by builds finished on or after the given time.- Returns:
- BuildFiltersBuilder for method chaining.
-
withIncludeRetriedJobs
Setting to TRUE, include all retried job executions in each build's jobs list. Setting to FALSE , you'll see only the most recently run job for each step.- Parameters:
includeRetriedJobs- Setting to TRUE, include all retried job executions in each build's jobs list. Setting to FALSE , you'll see only the most recently run job for each step.- Returns:
- BuildFiltersBuilder for method chaining.
-
withMetaData
Filters the results by the given meta-data.- Parameters:
name- Metadata key name.value- Metadata value.- Returns:
- BuildFiltersBuilder for method chaining.
-
withMetaData
Filters the results by the given meta-data.- Parameters:
metaData- Metadata values.- Returns:
- BuildFiltersBuilder for method chaining.
-
withStateChooser
Utility helper to fluently select states from known valid states.- Returns:
- Utility helper to fluently select states from known valid states.
-
withState
Filters the results by the given build state. The finished state is a shortcut to automatically search for builds with passed, failed, blocked, canceled states. See alsowithStateChooser(). Valid states: running, scheduled, passed, failing, failed, blocked, canceled, canceling, skipped, not_run, finished- Parameters:
state- Filters the results by the given build state.- Returns:
- BuildFiltersBuilder for method chaining.
-
withStates
Filters the results by the given build state. The finished state is a shortcut to automatically search for builds with passed, failed, blocked, canceled states. Valid states: running, scheduled, passed, failing, failed, blocked, canceled, canceling, skipped, not_run, finished- Parameters:
states- Filters the results by the given build state.- Returns:
- BuildFiltersBuilder for method chaining.
-
withStates
Filters the results by the given build state. The finished state is a shortcut to automatically search for builds with passed, failed, blocked, canceled states. Valid states: running, scheduled, passed, failing, failed, blocked, canceled, canceling, skipped, not_run, finished- Parameters:
states- Filters the results by the given build state.- Returns:
- BuildFiltersBuilder for method chaining.
-
withPerPage
Set the number of results per page.- Parameters:
perPage- Set the number of results per page.- Returns:
- BuildFiltersBuilder for method chaining.
-
withPage
Set the page to retrieve.- Parameters:
page- Set the page to retrieve.- Returns:
- BuildFiltersBuilder for method chaining.
-
withPageOptions
Apply Paging Options.- Parameters:
page- Set the page to retrieve.perPage- Set the number of results per page.- Returns:
- BuildFiltersBuilder for method chaining.
-
withPageOptions
Apply Paging Options.- Parameters:
pageOptions- Paging options to apply.- Returns:
- BuildFiltersBuilder for method chaining.
-
withOrganization
-
withPipeline
-
build
New BuildFilters instance using configured properties.- Returns:
- New BuildFilters instance using configured properties.
- Throws:
BuilderValidationException- if not valid or complete.
-