Package org.gitlab4j.api
Class RunnersApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.RunnersApi
-
- All Implemented Interfaces:
org.gitlab4j.models.Constants
public class RunnersApi extends AbstractApi
This class provides an entry point to all the GitLab API repository files calls.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.models.Constants
org.gitlab4j.models.Constants.ActionType, org.gitlab4j.models.Constants.ApplicationScope, org.gitlab4j.models.Constants.ArchiveFormat, org.gitlab4j.models.Constants.AutoCancelPendingPipelines, org.gitlab4j.models.Constants.AutoDevopsDeployStrategy, org.gitlab4j.models.Constants.BuildGitStrategy, org.gitlab4j.models.Constants.CommitBuildState, org.gitlab4j.models.Constants.ContributorOrderBy, org.gitlab4j.models.Constants.DefaultBranchProtectionLevel, org.gitlab4j.models.Constants.DeploymentOrderBy, org.gitlab4j.models.Constants.DeploymentStatus, org.gitlab4j.models.Constants.DeployTokenScope, org.gitlab4j.models.Constants.Encoding, org.gitlab4j.models.Constants.EpicOrderBy, org.gitlab4j.models.Constants.EventScope, org.gitlab4j.models.Constants.GroupOrderBy, org.gitlab4j.models.Constants.GroupSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.ImpersonationState, org.gitlab4j.models.Constants.IssueOrderBy, org.gitlab4j.models.Constants.IssueScope, org.gitlab4j.models.Constants.IssueState, org.gitlab4j.models.Constants.JobScope, org.gitlab4j.models.Constants.LineType, org.gitlab4j.models.Constants.MergeRequestOrderBy, org.gitlab4j.models.Constants.MergeRequestScope, org.gitlab4j.models.Constants.MergeRequestSearchIn, org.gitlab4j.models.Constants.MergeRequestState, org.gitlab4j.models.Constants.MilestoneState, org.gitlab4j.models.Constants.PackageOrderBy, org.gitlab4j.models.Constants.PackageStatus, org.gitlab4j.models.Constants.PipelineOrderBy, org.gitlab4j.models.Constants.PipelineScope, org.gitlab4j.models.Constants.PipelineSource, org.gitlab4j.models.Constants.ProjectAccessTokenScope, org.gitlab4j.models.Constants.ProjectCreationLevel, org.gitlab4j.models.Constants.ProjectFeatureVisibilityAccessLevel, org.gitlab4j.models.Constants.ProjectOrderBy, org.gitlab4j.models.Constants.ProjectSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SortOrder, org.gitlab4j.models.Constants.SquashOption, org.gitlab4j.models.Constants.StateEvent, org.gitlab4j.models.Constants.SubgroupCreationLevel, org.gitlab4j.models.Constants.TagOrderBy, org.gitlab4j.models.Constants.TargetType, org.gitlab4j.models.Constants.TodoAction, org.gitlab4j.models.Constants.TodoState, org.gitlab4j.models.Constants.TodoType, org.gitlab4j.models.Constants.TokenType
-
-
Field Summary
-
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
-
-
Constructor Summary
Constructors Constructor Description RunnersApi(GitLabApi gitLabApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteRunner(java.lang.String token)
Deletes a registered Runner.org.gitlab4j.api.models.Runner
disableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId)
Disable a specific runner from the project.org.gitlab4j.api.models.Runner
enableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId)
Enable an available specific runner in the project.java.util.List<org.gitlab4j.api.models.Runner>
getAllRunners()
Get a list of all runners in the GitLab instance (specific and shared).Pager<org.gitlab4j.api.models.Runner>
getAllRunners(int itemsPerPage)
Get a list of all runners in the GitLab instance (specific and shared).java.util.List<org.gitlab4j.api.models.Runner>
getAllRunners(int page, int perPage)
Get a list of all runners in the GitLab instance (specific and shared).java.util.List<org.gitlab4j.api.models.Runner>
getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status)
Get a list of all runners in the GitLab instance (specific and shared).Pager<org.gitlab4j.api.models.Runner>
getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int itemsPerPage)
Get a list of all runners in the GitLab instance (specific and shared).java.util.List<org.gitlab4j.api.models.Runner>
getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int page, int perPage)
Get a list of all runners in the GitLab instance (specific and shared).java.util.stream.Stream<org.gitlab4j.api.models.Runner>
getAllRunnersStream()
Get a Stream of all runners in the GitLab instance (specific and shared).java.util.stream.Stream<org.gitlab4j.api.models.Runner>
getAllRunnersStream(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status)
Get a Stream of all runners in the GitLab instance (specific and shared).java.util.List<org.gitlab4j.api.models.Job>
getJobs(java.lang.Long runnerId)
List jobs that are being processed or were processed by specified Runner.Pager<org.gitlab4j.api.models.Job>
getJobs(java.lang.Long runnerId, int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.java.util.List<org.gitlab4j.api.models.Job>
getJobs(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status)
List jobs that are being processed or were processed by specified Runner.Pager<org.gitlab4j.api.models.Job>
getJobs(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status, int itemsPerPage)
List jobs that are being processed or were processed by specified Runner.java.util.stream.Stream<org.gitlab4j.api.models.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<org.gitlab4j.api.models.Job>
getJobsStream(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status)
Get a Stream of jobs that are being processed or were processed by specified Runner.java.util.List<org.gitlab4j.api.models.Runner>
getProjectRunners(java.lang.Object projectIdOrPath)
List all runners (specific and shared) available in the project.Pager<org.gitlab4j.api.models.Runner>
getProjectRunners(java.lang.Object projectIdOrPath, int itemsPerPage)
List all runners (specific and shared) available in the project.java.util.stream.Stream<org.gitlab4j.api.models.Runner>
getProjectRunnersStream(java.lang.Object projectIdOrPath)
Get a Stream all runners (specific and shared) available in the project.org.gitlab4j.api.models.RunnerDetail
getRunnerDetail(java.lang.Long runnerId)
Get details of a runner.java.util.List<org.gitlab4j.api.models.Runner>
getRunners()
Get a list of all available runners available to the user.Pager<org.gitlab4j.api.models.Runner>
getRunners(int itemsPerPage)
Get a list of all available runners available to the user.java.util.List<org.gitlab4j.api.models.Runner>
getRunners(int page, int perPage)
Get a list of all available runners available to the user with pagination support.java.util.List<org.gitlab4j.api.models.Runner>
getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status)
Get a list of all available runners available to the user with pagination support.Pager<org.gitlab4j.api.models.Runner>
getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int itemsPerPage)
Get a list of specific runners available to the user.java.util.List<org.gitlab4j.api.models.Runner>
getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int page, int perPage)
Get a list of specific runners available to the user.java.util.stream.Stream<org.gitlab4j.api.models.Runner>
getRunnersStream()
Get a Stream of all available runners available to the user.java.util.stream.Stream<org.gitlab4j.api.models.Runner>
getRunnersStream(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status)
Get a Stream of all available runners available to the user with pagination support.org.gitlab4j.api.models.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.org.gitlab4j.api.models.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, org.gitlab4j.api.models.RunnerDetail.RunnerAccessLevel accessLevel)
Update details of a runner.-
Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getNamespaceIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
RunnersApi
public RunnersApi(GitLabApi gitLabApi)
-
-
Method Detail
-
getRunners
public java.util.List<org.gitlab4j.api.models.Runner> getRunners() throws GitLabApiException
Get a list of all available runners available to the user.GitLab Endpoint: GET /runners
- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunners
public java.util.List<org.gitlab4j.api.models.Runner> getRunners(int page, int perPage) throws GitLabApiException
Get a list of all available runners available to the user with pagination support.GitLab Endpoint: GET /runners
- Parameters:
page
- The page offset of runnersperPage
- The number of runners to get after the page offset- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunners
public Pager<org.gitlab4j.api.models.Runner> getRunners(int itemsPerPage) throws GitLabApiException
Get a list of all available runners available to the user.GitLab Endpoint: GET /runners
- Parameters:
itemsPerPage
- the number of Runner instances that will be fetched per page- Returns:
- a Pager containing the Runners for the user
- Throws:
GitLabApiException
- if any exception occurs
-
getRunnersStream
public java.util.stream.Stream<org.gitlab4j.api.models.Runner> getRunnersStream() throws GitLabApiException
Get a Stream of all available runners available to the user.GitLab Endpoint: GET /runners
- Returns:
- Stream of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunners
public java.util.List<org.gitlab4j.api.models.Runner> getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status) throws GitLabApiException
Get a list of all available runners available to the user with pagination support.GitLab Endpoint: GET /runners
- Parameters:
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 null- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunners
public java.util.List<org.gitlab4j.api.models.Runner> getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int page, int perPage) throws GitLabApiException
Get a list of specific runners available to the user.GitLab Endpoint: GET /runners
- Parameters:
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 offset- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunners
public Pager<org.gitlab4j.api.models.Runner> getRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int itemsPerPage) throws GitLabApiException
Get a list of specific runners available to the user.GitLab Endpoint: GET /runners
- Parameters:
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 page- Returns:
- a Pager containing the Runners for the user
- Throws:
GitLabApiException
- if any exception occurs
-
getRunnersStream
public java.util.stream.Stream<org.gitlab4j.api.models.Runner> getRunnersStream(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status) throws GitLabApiException
Get a Stream of all available runners available to the user with pagination support.GitLab Endpoint: GET /runners
- Parameters:
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 null- Returns:
- Stream of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public java.util.List<org.gitlab4j.api.models.Runner> getAllRunners() throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Returns:
- a List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public java.util.List<org.gitlab4j.api.models.Runner> getAllRunners(int page, int perPage) throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
page
- The page offset of runnersperPage
- The number of runners to get after the page offset- Returns:
- a list of all runners in the GitLab instance
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public Pager<org.gitlab4j.api.models.Runner> getAllRunners(int itemsPerPage) throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
itemsPerPage
- The number of Runner instances that will be fetched per page- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunnersStream
public java.util.stream.Stream<org.gitlab4j.api.models.Runner> getAllRunnersStream() throws GitLabApiException
Get a Stream of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Returns:
- a Stream of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public java.util.List<org.gitlab4j.api.models.Runner> getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status) throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
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 null- Returns:
- a List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public java.util.List<org.gitlab4j.api.models.Runner> getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int page, int perPage) throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
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 offset- Returns:
- List of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunners
public Pager<org.gitlab4j.api.models.Runner> getAllRunners(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status, int itemsPerPage) throws GitLabApiException
Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
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 page- Returns:
- a Pager containing the Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getAllRunnersStream
public java.util.stream.Stream<org.gitlab4j.api.models.Runner> getAllRunnersStream(org.gitlab4j.api.models.Runner.RunnerType type, org.gitlab4j.api.models.Runner.RunnerStatus status) throws GitLabApiException
Get a Stream of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.GitLab Endpoint: GET /runners/all
- Parameters:
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 null- Returns:
- a Stream of Runners
- Throws:
GitLabApiException
- if any exception occurs
-
getRunnerDetail
public org.gitlab4j.api.models.RunnerDetail getRunnerDetail(java.lang.Long runnerId) throws GitLabApiException
Get details of a runner.GitLab Endpoint: GET /runners/:id
- Parameters:
runnerId
- Runner id to get details for- Returns:
- RunnerDetail instance.
- Throws:
GitLabApiException
- if any exception occurs
-
updateRunner
public org.gitlab4j.api.models.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, org.gitlab4j.api.models.RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException
Update details of a runner.GitLab Endpoint: PUT /runners/:id
- Parameters:
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_protected- Returns:
- RunnerDetail instance.
- Throws:
GitLabApiException
- if any exception occurs
-
removeRunner
public void removeRunner(java.lang.Long runnerId) throws GitLabApiException
Remove a runner.GitLab Endpoint: DELETE /runners/:id
- Parameters:
runnerId
- The ID of a runner- Throws:
GitLabApiException
- if any exception occurs
-
getJobs
public java.util.List<org.gitlab4j.api.models.Job> getJobs(java.lang.Long runnerId) throws GitLabApiException
List jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
runnerId
- The ID of a runner- Returns:
- List jobs that are being processed or were processed by specified Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getJobsStream
public java.util.stream.Stream<org.gitlab4j.api.models.Job> getJobsStream(java.lang.Long runnerId) throws GitLabApiException
Get a Stream of jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
runnerId
- The ID of a runner- Returns:
- a Stream of jobs that are being processed or were processed by specified Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getJobs
public java.util.List<org.gitlab4j.api.models.Job> getJobs(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status) throws GitLabApiException
List jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
runnerId
- The ID of a runnerstatus
- Status of the job; one of: running, success, failed, canceled- Returns:
- List jobs that are being processed or were processed by specified Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getJobsStream
public java.util.stream.Stream<org.gitlab4j.api.models.Job> getJobsStream(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status) throws GitLabApiException
Get a Stream of jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
runnerId
- The ID of a runnerstatus
- Status of the job; one of: running, success, failed, canceled- Returns:
- a Stream of jobs that are being processed or were processed by specified Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getJobs
public Pager<org.gitlab4j.api.models.Job> getJobs(java.lang.Long runnerId, int itemsPerPage) throws GitLabApiException
List jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
runnerId
- The ID of a runneritemsPerPage
- The number of Runner instances that will be fetched per page- Returns:
- a Pager containing the Jobs for the Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getJobs
public Pager<org.gitlab4j.api.models.Job> getJobs(java.lang.Long runnerId, org.gitlab4j.api.models.JobStatus status, int itemsPerPage) throws GitLabApiException
List jobs that are being processed or were processed by specified Runner.GitLab Endpoint: GET /runners/:id/jobs
- Parameters:
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 page- Returns:
- a Pager containing the Jobs for the Runner
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectRunners
public java.util.List<org.gitlab4j.api.models.Runner> getProjectRunners(java.lang.Object projectIdOrPath) throws GitLabApiException
List all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings.GitLab Endpoint: GET /projects/:id/runners
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- List of all Runner available in the project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectRunnersStream
public java.util.stream.Stream<org.gitlab4j.api.models.Runner> getProjectRunnersStream(java.lang.Object projectIdOrPath) throws GitLabApiException
Get a Stream all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings.GitLab Endpoint: GET /projects/:id/runners
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of all Runner available in the project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectRunners
public Pager<org.gitlab4j.api.models.Runner> getProjectRunners(java.lang.Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
List all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings.GitLab Endpoint: GET /projects/:id/runners
- Parameters:
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 page- Returns:
- Pager of all Runner available in the project
- Throws:
GitLabApiException
- if any exception occurs
-
enableRunner
public org.gitlab4j.api.models.Runner enableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId) throws GitLabApiException
Enable an available specific runner in the project.GitLab Endpoint: POST /projects/:id/runners
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancerunnerId
- The ID of a runner- Returns:
- Runner instance of the Runner enabled
- Throws:
GitLabApiException
- if any exception occurs
-
disableRunner
public org.gitlab4j.api.models.Runner disableRunner(java.lang.Object projectIdOrPath, java.lang.Long runnerId) throws GitLabApiException
Disable a specific runner from the project. It works only if the project isn't the only project associated with the specified runner. If so, an error is returned. Use theremoveRunner(Long)
instead.GitLab Endpoint: DELETE /projects/:id/runners/:runner_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancerunnerId
- The ID of a runner- Returns:
- Runner instance of the Runner disabled
- Throws:
GitLabApiException
- if any exception occurs
-
registerRunner
public org.gitlab4j.api.models.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
Register a new runner for the gitlab instance.GitLab Endpoint: POST /runners/
- Parameters:
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 job- Returns:
- RunnerDetail instance.
- Throws:
GitLabApiException
- if any exception occurs
-
deleteRunner
public void deleteRunner(java.lang.String token) throws GitLabApiException
Deletes a registered Runner.GitLab Endpoint: DELETE /runners/
- Parameters:
token
- the runners authentication token- Throws:
GitLabApiException
- if any exception occurs
-
-