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
  • Constructor Details

    • PipelineApi

      public PipelineApi(GitLabApi gitLabApi)
  • Method Details

    • getPipelines

      public List<Pipeline> getPipelines(Object projectIdOrPath) throws GitLabApiException
      Get a list of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(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 GitLabApiException
      Get 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 Long(ID), String(path), or Project instance
      page - the page to get
      perPage - 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 GitLabApiException
      Get a Pager of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      itemsPerPage - 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

      public Stream<Pipeline> getPipelinesStream(Object projectIdOrPath) throws GitLabApiException
      Get a Stream of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(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 GitLabApiException
      Get a list of pipelines in a project filtered with the provided PipelineFilter.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - 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 GitLabApiException
      Get a Pager of pipelines in a project filtered with the provided PipelineFilter.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - a PipelineFilter instance used to filter the results
      itemsPerPage - 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 GitLabApiException
      Get a Stream of pipelines in a project filtered with the provided PipelineFilter.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - 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 GitLabApiException
      Get a list of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      scope - the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
      status - the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
      ref - the ref of pipelines
      yamlErrors - returns pipelines with invalid configurations
      name - the name of the user who triggered pipelines
      username - the username of the user who triggered pipelines
      orderBy - 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 GitLabApiException
      Get 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 Long(ID), String(path), or Project instance
      scope - the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
      status - the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
      ref - the ref of pipelines
      yamlErrors - returns pipelines with invalid configurations
      name - the name of the user who triggered pipelines
      username - the username of the user who triggered pipelines
      orderBy - order pipelines by ID, STATUS, REF, USER_ID (default: ID)
      sort - sort pipelines in ASC or DESC order (default: DESC)
      page - the page to get
      perPage - 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 GitLabApiException
      Get a Stream of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      scope - the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
      status - the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
      ref - the ref of pipelines
      yamlErrors - returns pipelines with invalid configurations
      name - the name of the user who triggered pipelines
      username - the username of the user who triggered pipelines
      orderBy - 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 GitLabApiException
      Get a Pager of pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      scope - the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
      status - the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
      ref - the ref of pipelines
      yamlErrors - returns pipelines with invalid configurations
      name - the name of the user who triggered pipelines
      username - the username of the user who triggered pipelines
      orderBy - 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

      public Pipeline getPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException
      Get single pipelines in a project.
      GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      pipelineId - the pipeline ID to get
      Returns:
      a single pipelines for the specified project ID
      Throws:
      GitLabApiException - if any exception occurs during execution
    • createPipeline

      public Pipeline createPipeline(Object projectIdOrPath, String ref) throws GitLabApiException
      Create a pipelines in a project.
      GitLab Endpoint: POST /projects/:id/pipeline
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      ref - 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 GitLabApiException
      Create a pipelines in a project.
      GitLab Endpoint: POST /projects/:id/pipeline
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      ref - reference to commit
      variables - 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 GitLabApiException
      Create a pipelines in a project.
      GitLab Endpoint: POST /projects/:id/pipeline
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      ref - reference to commit
      variables - 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

      public void deletePipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException
      Delete a pipeline from a project.
      GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_id
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      pipelineId - the pipeline ID to delete
      Throws:
      GitLabApiException - if any exception occurs during execution
    • retryPipelineJob

      public Pipeline retryPipelineJob(Object projectIdOrPath, long pipelineId) throws GitLabApiException
      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 Long(ID), String(path), or Project instance
      pipelineId - 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, long pipelineId) throws GitLabApiException
      Cancel 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 Long(ID), String(path), or Project instance
      pipelineId - 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 GitLabApiException
      Get 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 Long(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 GitLabApiException
      Get 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 Long(ID), String(path), or Project instance, required
      page - the page to get
      perPage - 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 GitLabApiException
      Get Pager of project pipeline schedule.
      GET /projects/:id/pipeline_schedule
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      itemsPerPage - 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 GitLabApiException
      Get 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 Long(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, Long pipelineScheduleId) throws GitLabApiException
      Get a specific pipeline schedule for project.
      GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineScheduleId - 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, Long 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 Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the ID of the hook to get
      Returns:
      the project PipelineSchedule as an Optional instance
    • createPipelineSchedule

      public PipelineSchedule createPipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule) throws GitLabApiException
      create a pipeline schedule for a project.
      POST /projects/:id/pipeline_schedules
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineSchedule - a PipelineSchedule instance to create
      Returns:
      the added PipelineSchedule instance
      Throws:
      GitLabApiException - if any exception occurs
    • deletePipelineSchedule

      public void deletePipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException
      Deletes a pipeline schedule from the project.
      DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the project schedule ID to delete
      Throws:
      GitLabApiException - if any exception occurs
    • updatePipelineSchedule

      public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule) throws GitLabApiException
      Modifies a pipeline schedule for project.
      PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineSchedule - 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, Long pipelineScheduleId) throws GitLabApiException
      Update 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 Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the pipelineSchedule instance id that ownership has to be taken of
      Returns:
      the modified project schedule
      Throws:
      GitLabApiException - if any exception occurs
    • playPipelineSchedule

      public void playPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException
      Trigger a new scheduled pipeline, which runs immediately.
      POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the pipelineSchedule instance id which should run immediately
      Throws:
      GitLabApiException - if any exception occurs during execution
    • createPipelineScheduleVariable

      public Variable createPipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId, String key, String value) throws GitLabApiException
      Create 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 Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the pipelineSchedule ID
      key - the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed
      value - 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, Long pipelineScheduleId, String key, String value) throws GitLabApiException
      Update 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 Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the pipelineSchedule ID
      key - the key of an existing pipeline schedule variable
      value - 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, Long pipelineScheduleId, String key) throws GitLabApiException
      Deletes a pipeline schedule variable.
      DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineScheduleId - the pipeline schedule ID
      key - the key of an existing pipeline schedule variable
      Throws:
      GitLabApiException - if any exception occurs
    • getPipelineTriggers

      public List<Trigger> getPipelineTriggers(Object projectIdOrPath) throws GitLabApiException
      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 Long(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 GitLabApiException
      Get list of project pipeline triggers in the specified page range.
      GET /projects/:id/triggers
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      page - the page to get
      perPage - 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 GitLabApiException
      Get Pager of project pipeline triggers.
      GET /projects/:id/pipeline_schedule
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      itemsPerPage - 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

      public Stream<Trigger> getPipelineTriggersStream(Object projectIdOrPath) throws GitLabApiException
      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 Long(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, Long triggerId) throws GitLabApiException
      Get a specific pipeline schedule for project.
      GET /projects/:id/triggers/:trigger_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      triggerId - the ID of the trigger to get
      Returns:
      the project pipeline trigger
      Throws:
      GitLabApiException - if any exception occurs
    • getOptionalPipelineTrigger

      public Optional<Trigger> getOptionalPipelineTrigger(Object projectIdOrPath, Long triggerId)
      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 Long(ID), String(path), or Project instance, required
      triggerId - 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 GitLabApiException
      Create a pipeline trigger for a project.
      POST /projects/:id/triggers
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      description - the trigger description
      Returns:
      the created Trigger instance
      Throws:
      GitLabApiException - if any exception occurs
    • updatePipelineTrigger

      public Trigger updatePipelineTrigger(Object projectIdOrPath, Long triggerId, String description) throws GitLabApiException
      Updates a pipeline trigger for project.
      PUT /projects/:id/triggers/:trigger_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      triggerId - the trigger ID to update
      description - the new trigger description
      Returns:
      the updated Trigger instance
      Throws:
      GitLabApiException - if any exception occurs
    • deletePipelineTrigger

      public void deletePipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException
      Deletes a pipeline trigger from the project.
      DELETE /projects/:id/triggers/:trigger_id
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      triggerId - the project trigger ID to delete
      Throws:
      GitLabApiException - if any exception occurs
    • takeOwnewrshipOfPipelineTrigger

      public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException
      Take 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 Long(ID), String(path), or Project instance, required
      triggerId - 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 GitLabApiException
      Trigger a pipeline for a project.
      POST /projects/:id/trigger/pipeline
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      trigger - the Trigger instance holding the trigger token
      ref - the ref that the pipeline is to be triggered for
      variables - 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 GitLabApiException
      Trigger a pipeline for a project.
      POST /projects/:id/trigger/pipeline
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      token - the trigger token
      ref - the ref that the pipeline is to be triggered for
      variables - 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, Long pipelineId) throws GitLabApiException
      Get List of variables of a pipeline.
      GET /projects/:id/pipelines/:pipeline_id/variables
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineId - the pipeline ID
      Returns:
      a List of pipeline variables
      Throws:
      GitLabApiException - if any exception occurs
    • getPipelineVariables

      public Pager<Variable> getPipelineVariables(Object projectIdOrPath, Long pipelineId, int itemsPerPage) throws GitLabApiException
      Get a Pager of variables of a pipeline.
      GET /projects/:id/pipelines/:pipeline_id/variables
      Parameters:
      projectIdOrPath - projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
      pipelineId - the pipeline ID
      itemsPerPage - 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, Long pipelineId) throws GitLabApiException
      Get 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 Long(ID), String(path), or Project instance, required
      pipelineId - the pipeline ID
      Returns:
      a Stream of pipeline variables
      Throws:
      GitLabApiException - if any exception occurs