public class RunnersApi extends AbstractApi
Constants.ActionType, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
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(String token)
Deletes a registered Runner.
|
Runner |
disableRunner(Object projectIdOrPath,
Integer runnerId)
Disable a specific runner from the project.
|
Runner |
enableRunner(Object projectIdOrPath,
Integer runnerId)
Enable an available specific runner in the project.
|
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).
|
List<Runner> |
getAllRunners(int page,
int perPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
List<Runner> |
getAllRunners(Runner.RunnerStatus scope)
Get a list of all runners in the GitLab instance (specific and shared).
|
Pager<Runner> |
getAllRunners(Runner.RunnerStatus scope,
int itemsPerPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
List<Runner> |
getAllRunners(Runner.RunnerStatus scope,
Integer page,
Integer perPage)
Get a list of all runners in the GitLab instance (specific and shared).
|
Stream<Runner> |
getAllRunnersStream()
Get a Stream of all runners in the GitLab instance (specific and shared).
|
Stream<Runner> |
getAllRunnersStream(Runner.RunnerStatus scope)
Get a Stream of all runners in the GitLab instance (specific and shared).
|
List<Job> |
getJobs(Integer runnerId)
List jobs that are being processed or were processed by specified Runner.
|
Pager<Job> |
getJobs(Integer runnerId,
int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.
|
List<Job> |
getJobs(Integer runnerId,
JobStatus status)
List jobs that are being processed or were processed by specified Runner.
|
Pager<Job> |
getJobs(Integer runnerId,
JobStatus status,
int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.
|
Stream<Job> |
getJobsStream(Integer runnerId)
Get a Stream of jobs that are being processed or were processed by specified Runner.
|
Stream<Job> |
getJobsStream(Integer runnerId,
JobStatus status)
Get a Stream of jobs that are being processed or were processed by specified Runner.
|
List<Runner> |
getProjectRunners(Object projectIdOrPath)
List all runners (specific and shared) available in the project.
|
Pager<Runner> |
getProjectRunners(Object projectIdOrPath,
int itemsPerPage)
List all runners (specific and shared) available in the project.
|
Stream<Runner> |
getProjectRunnersStream(Object projectIdOrPath)
Get a Stream all runners (specific and shared) available in the project.
|
RunnerDetail |
getRunnerDetail(Integer runnerId)
Get details of a runner.
|
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.
|
List<Runner> |
getRunners(int page,
int perPage)
Get a list of all available runners available to the user with pagination support.
|
List<Runner> |
getRunners(Runner.RunnerStatus scope)
Get a list of all available runners available to the user with pagination support.
|
Pager<Runner> |
getRunners(Runner.RunnerStatus scope,
int itemsPerPage)
Get a list of specific runners available to the user.
|
List<Runner> |
getRunners(Runner.RunnerStatus scope,
Integer page,
Integer perPage)
Get a list of specific runners available to the user.
|
Stream<Runner> |
getRunnersStream()
Get a Stream of all available runners available to the user.
|
Stream<Runner> |
getRunnersStream(Runner.RunnerStatus scope)
Get a Stream of all available runners available to the user with pagination support.
|
RunnerDetail |
registerRunner(String token,
String description,
Boolean active,
List<String> tagList,
Boolean runUntagged,
Boolean locked,
Integer maximumTimeout)
Register a new runner for the gitlab instance.
|
void |
removeRunner(Integer runnerId)
Remove a runner.
|
RunnerDetail |
updateRunner(Integer runnerId,
String description,
Boolean active,
List<String> tagList,
Boolean runUntagged,
Boolean locked,
RunnerDetail.RunnerAccessLevel accessLevel)
Update details of a runner.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public RunnersApi(GitLabApi gitLabApi)
public List<Runner> getRunners() throws GitLabApiException
GitLab Endpoint: GET /runners
GitLabApiException
- if any exception occurspublic Stream<Runner> getRunnersStream() throws GitLabApiException
GitLab Endpoint: GET /runners
GitLabApiException
- if any exception occurspublic List<Runner> getRunners(Runner.RunnerStatus scope) throws GitLabApiException
GitLab Endpoint: GET /runners
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullGitLabApiException
- if any exception occurspublic Stream<Runner> getRunnersStream(Runner.RunnerStatus scope) throws GitLabApiException
GitLab Endpoint: GET /runners
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullGitLabApiException
- if any exception occurspublic 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 List<Runner> getRunners(Runner.RunnerStatus scope, Integer page, Integer perPage) throws GitLabApiException
GitLab Endpoint: GET /runners
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullpage
- 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 Pager<Runner> getRunners(Runner.RunnerStatus scope, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners
scope
- the scope of specific runners to show, one of: active, paused, online; showing all runners nullitemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Runner> getAllRunners() throws GitLabApiException
GitLab Endpoint: GET /runners/all
GitLabApiException
- if any exception occurspublic Stream<Runner> getAllRunnersStream() throws GitLabApiException
GitLab Endpoint: GET /runners/all
GitLabApiException
- if any exception occurspublic List<Runner> getAllRunners(Runner.RunnerStatus scope) throws GitLabApiException
GitLab Endpoint: GET /runners/all
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullGitLabApiException
- if any exception occurspublic Stream<Runner> getAllRunnersStream(Runner.RunnerStatus scope) throws GitLabApiException
GitLab Endpoint: GET /runners/all
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullGitLabApiException
- if any exception occurspublic 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 List<Runner> getAllRunners(Runner.RunnerStatus scope, Integer page, Integer perPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
scope
- The scope of specific runners to show, one of: active, paused, online; showing all runners nullpage
- 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 Pager<Runner> getAllRunners(Runner.RunnerStatus scope, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /runners/all
scope
- the scope of specific runners to show, one of: active, paused, online; showing all runners nullitemsPerPage
- The number of Runner instances that will be fetched per pageGitLabApiException
- if any exception occurspublic RunnerDetail getRunnerDetail(Integer runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id
runnerId
- Runner id to get details forGitLabApiException
- if any exception occurspublic RunnerDetail updateRunner(Integer runnerId, String description, Boolean active, List<String> tagList, Boolean runUntagged, 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(Integer runnerId) throws GitLabApiException
GitLab Endpoint: DELETE /runners/:id
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic List<Job> getJobs(Integer runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic Stream<Job> getJobsStream(Integer runnerId) throws GitLabApiException
GitLab Endpoint: GET /runners/:id/jobs
runnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic List<Job> getJobs(Integer 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 Stream<Job> getJobsStream(Integer 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(Integer 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(Integer 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 List<Runner> getProjectRunners(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Stream<Runner> getProjectRunnersStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<Runner> getProjectRunners(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/runners
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/runners
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancerunnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException
removeRunner(Integer)
instead.
GitLab Endpoint: DELETE /projects/:id/runners/:runner_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancerunnerId
- The ID of a runnerGitLabApiException
- if any exception occurspublic RunnerDetail registerRunner(String token, String description, Boolean active, List<String> tagList, Boolean runUntagged, Boolean locked, 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(String token) throws GitLabApiException
GitLab Endpoint: DELETE /runners/
token
- the runners authentication tokenGitLabApiException
- if any exception occursCopyright © 2019. All rights reserved.