Module: Gitlab::Client::Pipelines
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/pipelines.rb
Overview
Defines methods related to pipelines.
Instance Method Summary collapse
-
#cancel_pipeline(project, id) ⇒ Gitlab::ObjectifiedHash
Cancels a pipeline.
-
#create_pipeline(project, ref) ⇒ Gitlab::ObjectifiedHash
Create a pipeline.
-
#pipeline(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single pipeline.
-
#pipelines(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project pipelines.
-
#retry_pipeline(project, id) ⇒ Array<Gitlab::ObjectifiedHash>
Retry a pipeline.
Instance Method Details
#cancel_pipeline(project, id) ⇒ Gitlab::ObjectifiedHash
Cancels a pipeline.
54 55 56 |
# File 'lib/gitlab/client/pipelines.rb', line 54 def cancel_pipeline(project, id) post("/projects/#{url_encode project}/pipelines/#{id}/cancel") end |
#create_pipeline(project, ref) ⇒ Gitlab::ObjectifiedHash
Create a pipeline.
42 43 44 |
# File 'lib/gitlab/client/pipelines.rb', line 42 def create_pipeline(project, ref) post("/projects/#{url_encode project}/pipeline?ref=#{ref}") end |
#pipeline(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single pipeline.
30 31 32 |
# File 'lib/gitlab/client/pipelines.rb', line 30 def pipeline(project, id) get("/projects/#{url_encode project}/pipelines/#{id}") end |
#pipelines(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project pipelines.
18 19 20 |
# File 'lib/gitlab/client/pipelines.rb', line 18 def pipelines(project, = {}) get("/projects/#{url_encode project}/pipelines", query: ) end |
#retry_pipeline(project, id) ⇒ Array<Gitlab::ObjectifiedHash>
Retry a pipeline.
66 67 68 |
# File 'lib/gitlab/client/pipelines.rb', line 66 def retry_pipeline(project, id) post("/projects/#{url_encode project}/pipelines/#{id}/retry") end |