Package org.gitlab4j.api
Class PipelineApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.PipelineApi
- All Implemented Interfaces:
Constants
public class PipelineApi extends AbstractApi implements Constants
This class provides an entry point to all the GitLab API pipeline related calls. For more information on the Pipeline APIs see:
Pipelines API Pipeline Schedules API Pipeline Triggers API-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, 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.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
Constructors Constructor Description PipelineApi(GitLabApi gitLabApi)
-
Method Summary
Modifier and Type Method Description Pipeline
cancelPipelineJobs(Object projectIdOrPath, int pipelineId)
Cancel jobs of specified pipelines in a project.Pipeline
createPipeline(Object projectIdOrPath, String ref)
Create a pipelines in a project.Pipeline
createPipeline(Object projectIdOrPath, String ref, List<Variable> variables)
Create a pipelines in a project.Pipeline
createPipeline(Object projectIdOrPath, String ref, Map<String,String> variables)
Create a pipelines in a project.PipelineSchedule
createPipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule)
create a pipeline schedule for a project.Variable
createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key, String value)
Create a pipeline schedule variable.Trigger
createPipelineTrigger(Object projectIdOrPath, String description)
Create a pipeline trigger for a project.void
deletePipeline(Object projectIdOrPath, int pipelineId)
Delete a pipeline from a project.void
deletePipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId)
Deletes a pipeline schedule from the project.void
deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key)
Deletes a pipeline schedule variable.void
deletePipelineTrigger(Object projectIdOrPath, Integer triggerId)
Deletes a pipeline trigger from the project.Optional<PipelineSchedule>
getOptionalPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId)
Get a specific pipeline schedule for project as an Optional instance.Optional<Trigger>
getOptionalPipelineTrigger(Object projectIdOrPath, Integer triggerId)
Get a specific pipeline trigger for project as an Optional instance.Pipeline
getPipeline(Object projectIdOrPath, int pipelineId)
Get single pipelines in a project.List<Pipeline>
getPipelines(Object projectIdOrPath)
Get a list of pipelines in a project.Pager<Pipeline>
getPipelines(Object projectIdOrPath, int itemsPerPage)
Get a Pager of pipelines in a project.List<Pipeline>
getPipelines(Object projectIdOrPath, int page, int perPage)
Get a list of pipelines in a project in the specified page range.List<Pipeline>
getPipelines(Object projectIdOrPath, 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.Pager<Pipeline>
getPipelines(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort, int itemsPerPage)
Get a Pager of pipelines in a project.List<Pipeline>
getPipelines(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort, int page, int perPage)
Get a list of pipelines in a project in the specified page range.List<Pipeline>
getPipelines(Object projectIdOrPath, PipelineFilter filter)
Get a list of pipelines in a project filtered with the providedPipelineFilter
.Pager<Pipeline>
getPipelines(Object projectIdOrPath, PipelineFilter filter, int itemsPerPage)
Get a Pager of pipelines in a project filtered with the providedPipelineFilter
.PipelineSchedule
getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId)
Get a specific pipeline schedule for project.List<PipelineSchedule>
getPipelineSchedules(Object projectIdOrPath)
Get a list of the project pipeline_schedules for the specified project.Pager<PipelineSchedule>
getPipelineSchedules(Object projectIdOrPath, int itemsPerPage)
Get Pager of project pipeline schedule.List<PipelineSchedule>
getPipelineSchedules(Object projectIdOrPath, int page, int perPage)
Get list of project pipeline schedules in the specified page range.Stream<PipelineSchedule>
getPipelineSchedulesStream(Object projectIdOrPath)
Get a Stream of the project pipeline schedule for the specified project.Stream<Pipeline>
getPipelinesStream(Object projectIdOrPath)
Get a Stream of pipelines in a project.Stream<Pipeline>
getPipelinesStream(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort)
Get a Stream of pipelines in a project.Stream<Pipeline>
getPipelinesStream(Object projectIdOrPath, PipelineFilter filter)
Get a Stream of pipelines in a project filtered with the providedPipelineFilter
.Trigger
getPipelineTrigger(Object projectIdOrPath, Integer triggerId)
Get a specific pipeline schedule for project.List<Trigger>
getPipelineTriggers(Object projectIdOrPath)
Get a list of the project pipeline triggers for the specified project.Pager<Trigger>
getPipelineTriggers(Object projectIdOrPath, int itemsPerPage)
Get Pager of project pipeline triggers.List<Trigger>
getPipelineTriggers(Object projectIdOrPath, int page, int perPage)
Get list of project pipeline triggers in the specified page range.Stream<Trigger>
getPipelineTriggersStream(Object projectIdOrPath)
Get a Stream of the project pipeline triggers for the specified project.List<Variable>
getPipelineVariables(Object projectIdOrPath, Integer pipelineId)
Get List of variables of a pipeline.Pager<Variable>
getPipelineVariables(Object projectIdOrPath, Integer pipelineId, int itemsPerPage)
Get a Pager of variables of a pipeline.Stream<Variable>
getPipelineVariablesStream(Object projectIdOrPath, Integer pipelineId)
Get a Stream of variables of a pipeline as a Stream.Pipeline
retryPipelineJob(Object projectIdOrPath, int pipelineId)
Retry a job in specified pipelines in a project.PipelineSchedule
takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId)
Update the owner of the pipeline schedule of a project.Trigger
takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Integer triggerId)
Take ownership of a pipeline trigger for project.Pipeline
triggerPipeline(Object projectIdOrPath, String token, String ref, List<Variable> variables)
Trigger a pipeline for a project.Pipeline
triggerPipeline(Object projectIdOrPath, Trigger trigger, String ref, List<Variable> variables)
Trigger a pipeline for a project.PipelineSchedule
updatePipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule)
Modifies a pipeline schedule for project.Variable
updatePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key, String value)
Update a pipeline schedule variable.Trigger
updatePipelineTrigger(Object projectIdOrPath, Integer triggerId, String description)
Updates a pipeline trigger for project.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
PipelineApi
-
-
Method Details
-
getPipelines
Get a list of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance- Returns:
- a list containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public List<Pipeline> getPipelines(Object projectIdOrPath, int page, int perPage) throws GitLabApiExceptionGet a list of pipelines in a project in the specified page range.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepage
- the page to getperPage
- the number of Pipeline instances per page- Returns:
- a list containing the pipelines for the specified project ID in the specified page range
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public Pager<Pipeline> getPipelines(Object projectIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet a Pager of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceitemsPerPage
- the number of Pipeline instances that will be fetched per page- Returns:
- a Pager containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelinesStream
Get a Stream of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance- Returns:
- a Stream containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public List<Pipeline> getPipelines(Object projectIdOrPath, PipelineFilter filter) throws GitLabApiExceptionGet a list of pipelines in a project filtered with the providedPipelineFilter
.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancefilter
- a PipelineFilter instance used to filter the results- Returns:
- a list containing the pipelines for the specified project ID and matching the provided filter
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public Pager<Pipeline> getPipelines(Object projectIdOrPath, PipelineFilter filter, int itemsPerPage) throws GitLabApiExceptionGet a Pager of pipelines in a project filtered with the providedPipelineFilter
.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancefilter
- a PipelineFilter instance used to filter the resultsitemsPerPage
- the number of Pipeline instances that will be fetched per page- Returns:
- a Pager containing the pipelines for the specified project ID and matching the provided filter
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelinesStream
public Stream<Pipeline> getPipelinesStream(Object projectIdOrPath, PipelineFilter filter) throws GitLabApiExceptionGet a Stream of pipelines in a project filtered with the providedPipelineFilter
.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancefilter
- a PipelineFilter instance used to filter the results- Returns:
- a Stream containing the pipelines for the specified project ID and matching the provided filter
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public List<Pipeline> getPipelines(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort) throws GitLabApiExceptionGet a list of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancescope
- 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)- Returns:
- a list containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public List<Pipeline> getPipelines(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort, int page, int perPage) throws GitLabApiExceptionGet a list of pipelines in a project in the specified page range.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancescope
- 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)page
- the page to getperPage
- the number of Pipeline instances per page- Returns:
- a list containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelinesStream
public Stream<Pipeline> getPipelinesStream(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort) throws GitLabApiExceptionGet a Stream of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancescope
- 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)- Returns:
- a Stream containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelines
public Pager<Pipeline> getPipelines(Object projectIdOrPath, Constants.PipelineScope scope, PipelineStatus status, String ref, boolean yamlErrors, String name, String username, Constants.PipelineOrderBy orderBy, Constants.SortOrder sort, int itemsPerPage) throws GitLabApiExceptionGet a Pager of pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancescope
- 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)itemsPerPage
- the number of Pipeline instances that will be fetched per page- Returns:
- a list containing the pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipeline
Get single pipelines in a project.GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepipelineId
- the pipeline ID to get- Returns:
- a single pipelines for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createPipeline
Create a pipelines in a project.GitLab Endpoint: POST /projects/:id/pipeline
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- reference to commit- Returns:
- a Pipeline instance with the newly created pipeline info
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createPipeline
public Pipeline createPipeline(Object projectIdOrPath, String ref, Map<String,String> variables) throws GitLabApiExceptionCreate a pipelines in a project.GitLab Endpoint: POST /projects/:id/pipeline
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- reference to commitvariables
- a Map containing the variables available in the pipeline- Returns:
- a Pipeline instance with the newly created pipeline info
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createPipeline
public Pipeline createPipeline(Object projectIdOrPath, String ref, List<Variable> variables) throws GitLabApiExceptionCreate a pipelines in a project.GitLab Endpoint: POST /projects/:id/pipeline
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- reference to commitvariables
- a Map containing the variables available in the pipeline- Returns:
- a Pipeline instance with the newly created pipeline info
- Throws:
GitLabApiException
- if any exception occurs during execution
-
deletePipeline
Delete a pipeline from a project.GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_id
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepipelineId
- the pipeline ID to delete- Throws:
GitLabApiException
- if any exception occurs during execution
-
retryPipelineJob
Retry a job in specified pipelines in a project.GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/retry
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepipelineId
- the pipeline ID to retry a job from- Returns:
- pipeline instance which just retried
- Throws:
GitLabApiException
- if any exception occurs during execution
-
cancelPipelineJobs
public Pipeline cancelPipelineJobs(Object projectIdOrPath, int pipelineId) throws GitLabApiExceptionCancel jobs of specified pipelines in a project.GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/cancel
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepipelineId
- the pipeline ID to cancel jobs- Returns:
- pipeline instance which just canceled
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getPipelineSchedules
public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath) throws GitLabApiExceptionGet a list of the project pipeline_schedules for the specified project.GET /projects/:id/pipeline_schedules
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required- Returns:
- a list of pipeline schedules for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineSchedules
public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int page, int perPage) throws GitLabApiExceptionGet list of project pipeline schedules in the specified page range.GET /projects/:id/pipeline_schedules
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of PipelineSchedule instances per page- Returns:
- a list of project pipeline_schedules for the specified project in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineSchedules
public Pager<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet Pager of project pipeline schedule.GET /projects/:id/pipeline_schedule
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requireditemsPerPage
- the number of PipelineSchedule instances that will be fetched per page- Returns:
- a Pager of project pipeline_schedules for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineSchedulesStream
public Stream<PipelineSchedule> getPipelineSchedulesStream(Object projectIdOrPath) throws GitLabApiExceptionGet a Stream of the project pipeline schedule for the specified project.GET /projects/:id/pipeline_schedule
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required- Returns:
- a Stream of project pipeline schedules for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineSchedule
public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiExceptionGet a specific pipeline schedule for project.GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the ID of the pipeline schedule to get- Returns:
- the project PipelineSchedule
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalPipelineSchedule
public Optional<PipelineSchedule> getOptionalPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId)Get a specific pipeline schedule for project as an Optional instance.GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the ID of the hook to get- Returns:
- the project PipelineSchedule as an Optional instance
-
createPipelineSchedule
public PipelineSchedule createPipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule) throws GitLabApiExceptioncreate a pipeline schedule for a project.POST /projects/:id/pipeline_schedules
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineSchedule
- a PipelineSchedule instance to create- Returns:
- the added PipelineSchedule instance
- Throws:
GitLabApiException
- if any exception occurs
-
deletePipelineSchedule
public void deletePipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiExceptionDeletes a pipeline schedule from the project.DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the project schedule ID to delete- Throws:
GitLabApiException
- if any exception occurs
-
updatePipelineSchedule
public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule) throws GitLabApiExceptionModifies a pipeline schedule for project.PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineSchedule
- the pipelineSchedule instance that contains the pipelineSchedule info to modify- Returns:
- the modified project schedule
- Throws:
GitLabApiException
- if any exception occurs
-
takeOwnershipPipelineSchedule
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiExceptionUpdate the owner of the pipeline schedule of a project.POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the pipelineSchedule instance id that ownership has to be taken of- Returns:
- the modified project schedule
- Throws:
GitLabApiException
- if any exception occurs
-
createPipelineScheduleVariable
public Variable createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key, String value) throws GitLabApiExceptionCreate a pipeline schedule variable.GitLab Endpoint: POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the pipelineSchedule IDkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowedvalue
- the value for the variable- Returns:
- a Pipeline instance with the newly created pipeline schedule variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updatePipelineScheduleVariable
public Variable updatePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key, String value) throws GitLabApiExceptionUpdate a pipeline schedule variable.GitLab Endpoint: PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the pipelineSchedule IDkey
- the key of an existing pipeline schedule variablevalue
- the new value for the variable- Returns:
- a Pipeline instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
deletePipelineScheduleVariable
public void deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key) throws GitLabApiExceptionDeletes a pipeline schedule variable.DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineScheduleId
- the pipeline schedule IDkey
- the key of an existing pipeline schedule variable- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineTriggers
Get a list of the project pipeline triggers for the specified project.GET /projects/:id/triggers
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required- Returns:
- a list of pipeline triggers for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineTriggers
public List<Trigger> getPipelineTriggers(Object projectIdOrPath, int page, int perPage) throws GitLabApiExceptionGet list of project pipeline triggers in the specified page range.GET /projects/:id/triggers
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of Trigger instances per page- Returns:
- a list of project pipeline triggers for the specified project in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineTriggers
public Pager<Trigger> getPipelineTriggers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet Pager of project pipeline triggers.GET /projects/:id/pipeline_schedule
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requireditemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of project pipeline triggers for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineTriggersStream
Get a Stream of the project pipeline triggers for the specified project.GET /projects/:id/pipeline_schedule
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required- Returns:
- a Stream of project pipeline triggers for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineTrigger
public Trigger getPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiExceptionGet a specific pipeline schedule for project.GET /projects/:id/triggers/:trigger_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtriggerId
- the ID of the trigger to get- Returns:
- the project pipeline trigger
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalPipelineTrigger
Get a specific pipeline trigger for project as an Optional instance.GET /projects/:id/triggers/:trigger_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtriggerId
- the ID of the trigger to get- Returns:
- the project pipeline trigger as an Optional instance
-
createPipelineTrigger
public Trigger createPipelineTrigger(Object projectIdOrPath, String description) throws GitLabApiExceptionCreate a pipeline trigger for a project.POST /projects/:id/triggers
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requireddescription
- the trigger description- Returns:
- the created Trigger instance
- Throws:
GitLabApiException
- if any exception occurs
-
updatePipelineTrigger
public Trigger updatePipelineTrigger(Object projectIdOrPath, Integer triggerId, String description) throws GitLabApiExceptionUpdates a pipeline trigger for project.PUT /projects/:id/triggers/:trigger_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtriggerId
- the trigger ID to updatedescription
- the new trigger description- Returns:
- the updated Trigger instance
- Throws:
GitLabApiException
- if any exception occurs
-
deletePipelineTrigger
public void deletePipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiExceptionDeletes a pipeline trigger from the project.DELETE /projects/:id/triggers/:trigger_id
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtriggerId
- the project trigger ID to delete- Throws:
GitLabApiException
- if any exception occurs
-
takeOwnewrshipOfPipelineTrigger
public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiExceptionTake ownership of a pipeline trigger for project.PUT /projects/:id/triggers/:trigger_id/take_ownership
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtriggerId
- the trigger ID to take opwnership of- Returns:
- the updated Trigger instance
- Throws:
GitLabApiException
- if any exception occurs
-
triggerPipeline
public Pipeline triggerPipeline(Object projectIdOrPath, Trigger trigger, String ref, List<Variable> variables) throws GitLabApiExceptionTrigger a pipeline for a project.POST /projects/:id/trigger/pipeline
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtrigger
- the Trigger instance holding the trigger tokenref
- the ref that the pipeline is to be triggered forvariables
- a List of variables to be passed with the trigger- Returns:
- a Pipeline instance holding information on the triggered pipeline
- Throws:
GitLabApiException
- if any exception occurs
-
triggerPipeline
public Pipeline triggerPipeline(Object projectIdOrPath, String token, String ref, List<Variable> variables) throws GitLabApiExceptionTrigger a pipeline for a project.POST /projects/:id/trigger/pipeline
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredtoken
- the trigger tokenref
- the ref that the pipeline is to be triggered forvariables
- a List of variables to be passed with the trigger- Returns:
- a Pipeline instance holding information on the triggered pipeline
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineVariables
public List<Variable> getPipelineVariables(Object projectIdOrPath, Integer pipelineId) throws GitLabApiExceptionGet List of variables of a pipeline.GET /projects/:id/pipelines/:pipeline_id/variables
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineId
- the pipeline ID- Returns:
- a List of pipeline variables
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineVariables
public Pager<Variable> getPipelineVariables(Object projectIdOrPath, Integer pipelineId, int itemsPerPage) throws GitLabApiExceptionGet a Pager of variables of a pipeline.GET /projects/:id/pipelines/:pipeline_id/variables
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineId
- the pipeline IDitemsPerPage
- the number of Pipeline instances that will be fetched per page- Returns:
- a Pager of pipeline variables
- Throws:
GitLabApiException
- if any exception occurs
-
getPipelineVariablesStream
public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Integer pipelineId) throws GitLabApiExceptionGet a Stream of variables of a pipeline as a Stream.GET /projects/:id/pipelines/:pipeline_id/variables
- Parameters:
projectIdOrPath
- projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, requiredpipelineId
- the pipeline ID- Returns:
- a Stream of pipeline variables
- Throws:
GitLabApiException
- if any exception occurs
-