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.TokenTypeNEXT_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(Integer projectId,
Integer runnerId)
Disable a specific runner from the project.
|
Runner |
enableRunner(Integer projectId,
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).
|
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.
|
List<Runner> |
getProjectRunners(Integer projectId)
List all runners (specific and shared) available in the project.
|
Pager<Runner> |
getProjectRunners(Integer projectId,
int itemsPerPage)
List 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.
|
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, urlEncode, validatepublic RunnersApi(GitLabApi gitLabApi)
public List<Runner> getRunners() throws GitLabApiException
GitLabApiException - if any exception occurspublic List<Runner> getRunners(Runner.RunnerStatus scope) throws GitLabApiException
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
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
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
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
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
GitLabApiException - if any exception occurspublic List<Runner> getAllRunners(Runner.RunnerStatus scope) throws GitLabApiException
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
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
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
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
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
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
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
runnerId - The ID of a runnerGitLabApiException - if any exception occurspublic List<Job> getJobs(Integer runnerId) throws GitLabApiException
runnerId - The ID of a runnerGitLabApiException - if any exception occurspublic List<Job> getJobs(Integer runnerId, JobStatus status) throws GitLabApiException
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
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
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(Integer projectId) throws GitLabApiException
projectId - The ID of the project owned by the authenticated userGitLabApiException - if any exception occurspublic Pager<Runner> getProjectRunners(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId - The ID of the project owned by the authenticated useritemsPerPage - the number of Project instances that will be fetched per pageGitLabApiException - if any exception occurspublic Runner enableRunner(Integer projectId, Integer runnerId) throws GitLabApiException
projectId - The ID of the project owned by the authenticated userrunnerId - The ID of a runnerGitLabApiException - if any exception occurspublic Runner disableRunner(Integer projectId, Integer runnerId) throws GitLabApiException
removeRunner(Integer) instead.
DELETE /projects/:id/runners/:runner_idprojectId - The ID of the project owned by the authenticated userrunnerId - 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
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
token - the runners authentication tokenGitLabApiException - if any exception occursCopyright © 2018. All rights reserved.