public class RunnersApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DefaultBranchProtectionLevel, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectAccessTokenScope, Constants.ProjectCreationLevel, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.SubgroupCreationLevel, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
RunnersApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
void |
deleteRunner(java.lang.String token)
Deletes a registered Runner.
|
Runner |
disableRunner(java.lang.Object projectIdOrPath,
java.lang.Long runnerId)
Disable a specific runner from the project.
|
Runner |
enableRunner(java.lang.Object projectIdOrPath,
java.lang.Long runnerId)
Enable an available specific runner in the project.
|
java.util.List<Runner> |
getAllRunners()
Get a list of all runners in the GitLab instance (specific and shared).
|
Pager<Runner> |
getAllRunners(int itemsPerPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
java.util.List<Runner> |
getAllRunners(int page,
int perPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
java.util.List<Runner> |
getAllRunners(Runner.RunnerType type,
Runner.RunnerStatus status)
Get a list of all runners in the GitLab instance (specific and shared).
|
Pager<Runner> |
getAllRunners(Runner.RunnerType type,
Runner.RunnerStatus status,
int itemsPerPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
java.util.List<Runner> |
getAllRunners(Runner.RunnerType type,
Runner.RunnerStatus status,
int page,
int perPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
java.util.stream.Stream<Runner> |
getAllRunnersStream()
Get a Stream of all runners in the GitLab instance (specific and shared).
|
java.util.stream.Stream<Runner> |
getAllRunnersStream(Runner.RunnerType type,
Runner.RunnerStatus status)
Get a Stream of all runners in the GitLab instance (specific and shared).
|
java.util.List<Job> |
getJobs(java.lang.Long runnerId)
List jobs that are being processed or were processed by specified Runner.
|
Pager<Job> |
getJobs(java.lang.Long runnerId,
int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.
|
java.util.List<Job> |
getJobs(java.lang.Long runnerId,
JobStatus status)
List jobs that are being processed or were processed by specified Runner.
|
Pager<Job> |
getJobs(java.lang.Long runnerId,
JobStatus status,
int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.
|
java.util.stream.Stream<Job> |
getJobsStream(java.lang.Long runnerId)
Get a Stream of jobs that are being processed or were processed by specified Runner.
|
java.util.stream.Stream<Job> |
getJobsStream(java.lang.Long runnerId,
JobStatus status)
Get a Stream of jobs that are being processed or were processed by specified Runner.
|
java.util.List<Runner> |
getProjectRunners(java.lang.Object projectIdOrPath)
List all runners (specific and shared) available in the project.
|
Pager<Runner> |
getProjectRunners(java.lang.Object projectIdOrPath,
int itemsPerPage)
List all runners (specific and shared) available in the project.
|
java.util.stream.Stream<Runner> |
getProjectRunnersStream(java.lang.Object projectIdOrPath)
Get a Stream all runners (specific and shared) available in the project.
|
RunnerDetail |
getRunnerDetail(java.lang.Long runnerId)
Get details of a runner.
|
java.util.List<Runner> |
getRunners()
Get a list of all available runners available to the user.
|
Pager<Runner> |
getRunners(int itemsPerPage)
Get a list of all available runners available to the user.
|
java.util.List<Runner> |
getRunners(int page,
int perPage)
Get a list of all available runners available to the user with pagination support.
|
java.util.List<Runner> |
getRunners(Runner.RunnerType type,
Runner.RunnerStatus status)
Get a list of all available runners available to the user with pagination support.
|
Pager<Runner> |
getRunners(Runner.RunnerType type,
Runner.RunnerStatus status,
int itemsPerPage)
Get a list of specific runners available to the user.
|
java.util.List<Runner> |
getRunners(Runner.RunnerType type,
Runner.RunnerStatus status,
int page,
int perPage)
Get a list of specific runners available to the user.
|
java.util.stream.Stream<Runner> |
getRunnersStream()
Get a Stream of all available runners available to the user.
|
java.util.stream.Stream<Runner> |
getRunnersStream(Runner.RunnerType type,
Runner.RunnerStatus status)
Get a Stream of all available runners available to the user with pagination support.
|
RunnerDetail |
registerRunner(java.lang.String token,
java.lang.String description,
java.lang.Boolean active,
java.util.List<java.lang.String> tagList,
java.lang.Boolean runUntagged,
java.lang.Boolean locked,
java.lang.Integer maximumTimeout)
Register a new runner for the gitlab instance.
|
void |
removeRunner(java.lang.Long runnerId)
Remove a runner.
|
RunnerDetail |
updateRunner(java.lang.Long runnerId,
java.lang.String description,
java.lang.Boolean active,
java.util.List<java.lang.String> tagList,
java.lang.Boolean runUntagged,
java.lang.Boolean locked,
RunnerDetail.RunnerAccessLevel accessLevel)
Update details of a runner.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
public RunnersApi(GitLabApi gitLabApi)
public java.util.List<Runner> getRunners() throws GitLabApiException
GitLab Endpoint: GET /runners
GitLabApiException
- if any exception occurspublic java.util.List<Runner> getRunners(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /runners
page
- The page offset of runnersperPage
- The number of runners to get after the page offsetGitLabApiException
- if any exception occurspublic Pager<Runner> getRunners(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners
itemsPerPage
- the number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Runner> getRunnersStream() throws GitLabApiException
GitLab Endpoint: GET /runners
GitLabApiException
- if any exception occurspublic java.util.List<Runner> getRunners(Runner.RunnerType type, Runner.RunnerStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullGitLabApiException
- if any exception occurspublic java.util.List<Runner> getRunners(Runner.RunnerType type, Runner.RunnerStatus status, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /runners
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullpage
- the page offset of runnersperPage
- the number of runners to get after the page offsetGitLabApiException
- if any exception occurspublic Pager<Runner> getRunners(Runner.RunnerType type, Runner.RunnerStatus status, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullitemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Runner> getRunnersStream(Runner.RunnerType type, Runner.RunnerStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullGitLabApiException
- if any exception occurspublic java.util.List<Runner> getAllRunners() throws GitLabApiException
GitLab Endpoint: GET /runners/all
GitLabApiException
- if any exception occurspublic java.util.List<Runner> getAllRunners(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
page
- The page offset of runnersperPage
- The number of runners to get after the page offsetGitLabApiException
- if any exception occurspublic Pager<Runner> getAllRunners(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
itemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Runner> getAllRunnersStream() throws GitLabApiException
GitLab Endpoint: GET /runners/all
GitLabApiException
- if any exception occurspublic java.util.List<Runner> getAllRunners(Runner.RunnerType type, Runner.RunnerStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners/all
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullGitLabApiException
- if any exception occurspublic java.util.List<Runner> getAllRunners(Runner.RunnerType type, Runner.RunnerStatus status, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullpage
- The page offset of runnersperPage
- The number of runners to get after the page offsetGitLabApiException
- if any exception occurspublic Pager<Runner> getAllRunners(Runner.RunnerType type, Runner.RunnerStatus status, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullitemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Runner> getAllRunnersStream(Runner.RunnerType type, Runner.RunnerStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners/all
type
- the type of runners to show, one of: instance_type, group_type, project_type, or nullstatus
- the status of runners to show, one of: active, paused, online, offline, or nullGitLabApiException
- if any exception occurspublic RunnerDetail getRunnerDetail(java.lang.Long runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id
runnerId
- Runner id to get details forGitLabApiException
- if any exception occurspublic RunnerDetail updateRunner(java.lang.Long runnerId, java.lang.String description, java.lang.Boolean active, java.util.List<java.lang.String> tagList, java.lang.Boolean runUntagged, java.lang.Boolean locked, RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException
GitLab Endpoint: PUT /runners/:id
runnerId
- The ID of a runnerdescription
- The description of a runneractive
- The state of a runner; can be set to true or falsetagList
- The list of tags for a runner; put array of tags, that should be finally assigned to a runnerrunUntagged
- Flag indicating the runner can execute untagged jobslocked
- Flag indicating the runner is lockedaccessLevel
- The access_level of the runner; not_protected or ref_protectedGitLabApiException
- if any exception occurspublic void removeRunner(java.lang.Long runnerId) throws GitLabApiException
GitLab Endpoint: DELETE /runners/:id
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic java.util.List<Job> getJobs(java.lang.Long runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Job> getJobsStream(java.lang.Long runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic java.util.List<Job> getJobs(java.lang.Long runnerId, JobStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerstatus
- Status of the job; one of: running, success, failed, canceledGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Job> getJobsStream(java.lang.Long runnerId, JobStatus status) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerstatus
- Status of the job; one of: running, success, failed, canceledGitLabApiException
- if any exception occurspublic Pager<Job> getJobs(java.lang.Long runnerId, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runneritemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Pager<Job> getJobs(java.lang.Long runnerId, JobStatus status, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerstatus
- Status of the job; one of: running, success, failed, canceleditemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.List<Runner> getProjectRunners(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Runner> getProjectRunnersStream(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<Runner> getProjectRunners(java.lang.Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Runner enableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/runners
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancerunnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic Runner disableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId) throws GitLabApiException
removeRunner(Long)
instead.
GitLab Endpoint: DELETE /projects/:id/runners/:runner_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancerunnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic RunnerDetail registerRunner(java.lang.String token, java.lang.String description, java.lang.Boolean active, java.util.List<java.lang.String> tagList, java.lang.Boolean runUntagged, java.lang.Boolean locked, java.lang.Integer maximumTimeout) throws GitLabApiException
GitLab Endpoint: POST /runners/
token
- the token of the project (for project specific runners) or the token from the admin pagedescription
- The description of a runneractive
- The state of a runner; can be set to true or falsetagList
- The list of tags for a runner; put array of tags, that should be finally assigned to a runnerrunUntagged
- Flag indicating the runner can execute untagged jobslocked
- Flag indicating the runner is lockedmaximumTimeout
- the maximum timeout set when this Runner will handle the jobGitLabApiException
- if any exception occurspublic void deleteRunner(java.lang.String token) throws GitLabApiException
GitLab Endpoint: DELETE /runners/
token
- the runners authentication tokenGitLabApiException
- if any exception occurs