public class PipelineApi extends AbstractApi implements Constants
Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder
Constructor and Description |
---|
PipelineApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
Pipeline |
cancelPipelineJobs(int projectId,
int pipelineId)
Cancel jobs of specified pipelines in a project.
|
Pipeline |
createPipeline(int projectId,
String ref)
Create a pipelines in a project.
|
Pipeline |
getPipeline(int projectId,
int pipelineId)
Get single pipelines in a project.
|
List<Pipeline> |
getPipelines(int projectId)
Get a list of pipelines in a project.
|
List<Pipeline> |
getPipelines(int projectId,
Constants.PipelineScope scope,
PipelineStatus status,
String ref,
boolean yamlErrors,
String name,
String username,
Constants.PipelineOrderBy orderBy,
Constants.SortOrder sort)
Get a list of pipelines in a project.
|
Pipeline |
retryPipelineJob(int projectId,
int pipelineId)
Retry a job in specified pipelines in a project.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, handle, isApiVersion, post, post, post, put, put, urlEncode, validate
public PipelineApi(GitLabApi gitLabApi)
public List<Pipeline> getPipelines(int projectId) throws GitLabApiException
projectId
- the project ID to get the list of pipelines forGitLabApiException
- if any exception occurs during executionpublic List<Pipeline> getPipelines(int projectId, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort) throws GitLabApiException
projectId
- the project ID to get the list of pipelines forscope
- the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGSstatus
- the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPEDref
- the ref of pipelinesyamlErrors
- returns pipelines with invalid configurationsname
- the name of the user who triggered pipelinesusername
- the username of the user who triggered pipelinesorderBy
- order pipelines by ID, STATUS, REF, USER_ID (default: ID)sort
- sort pipelines in ASC or DESC order (default: DESC)GitLabApiException
- if any exception occurs during executionpublic Pipeline getPipeline(int projectId, int pipelineId) throws GitLabApiException
projectId
- the project ID to get the specified pipeline forpipelineId
- the pipeline ID to getGitLabApiException
- if any exception occurs during executionpublic Pipeline createPipeline(int projectId, String ref) throws GitLabApiException
projectId
- the project ID to create a pipeline inref
- reference to commitGitLabApiException
- if any exception occurs during executionpublic Pipeline retryPipelineJob(int projectId, int pipelineId) throws GitLabApiException
projectId
- the project ID to retry a job for speficied pipelinepipelineId
- the pipeline ID to retry a job fromGitLabApiException
- if any exception occurs during executionpublic Pipeline cancelPipelineJobs(int projectId, int pipelineId) throws GitLabApiException
projectId
- the project ID to cancel jobs for speficied pipelinepipelineId
- the pipeline ID to cancel jobsGitLabApiException
- if any exception occurs during executionCopyright © 2017. All rights reserved.