module Gitlab::Client::Pipelines
Defines methods related to pipelines. @see docs.gitlab.com/ce/api/pipelines.html
Public Instance Methods
Cancels a pipeline.
@example
Gitlab.cancel_pipeline(5, 1)
@param [Integer] project The ID of a project. @param [Integer] id The ID of a pipeline. @return [Gitlab::ObjectifiedHash] The pipelines changes.
# File lib/gitlab/client/pipelines.rb, line 52 def cancel_pipeline(project, id) post("/projects/#{project}/pipelines/#{id}/cancel") end
Create a pipeline.
@example
Gitlab.create_pipeline(5, 'master')
@param [Integer] project The ID of a project. @param [String] ref Reference to commit. @return [Gitlab::ObjectifiedHash] The pipelines changes.
# File lib/gitlab/client/pipelines.rb, line 40 def create_pipeline(project, ref) post("/projects/#{project}/pipeline?ref=#{ref}") end
Gets a single pipeline.
@example
Gitlab.pipeline(5, 36)
@param [Integer] project The ID of a project. @param [Integer] id The ID of a pipeline. @return [Gitlab::ObjectifiedHash]
# File lib/gitlab/client/pipelines.rb, line 28 def pipeline(project, id) get("/projects/#{project}/pipelines/#{id}") end
Gets a list of project pipelines.
@example
Gitlab.pipelines(5) Gitlab.pipelines(5, { per_page: 10, page: 2 })
@param [Integer] project The ID of a project. @param [Hash] options A customizable set of options. @option options [Integer] :page The page number. @option options [Integer] :per_page The number of results per page. @return [Array<Gitlab::ObjectifiedHash>]
# File lib/gitlab/client/pipelines.rb, line 16 def pipelines(project, options={}) get("/projects/#{project}/pipelines", query: options) end
Retry a pipeline.
@example
Gitlab.retry_pipeline(5, 1)
@param [Integer] project The ID of a project. @param [Integer] id The ID of a pipeline. @return [Array<Gitlab::ObjectifiedHash>] The pipelines changes.
# File lib/gitlab/client/pipelines.rb, line 64 def retry_pipeline(project, id) post("/projects/#{project}/pipelines/#{id}/retry") end