Module: Gitlab::Client::PipelineSchedules
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/pipeline_schedules.rb
Overview
Defines methods related to pipeline schedules.
Instance Method Summary collapse
-
#create_pipeline_schedule(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Create a pipeline schedule.
-
#create_pipeline_schedule_variable(project, pipeline_schedule_id, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Create a pipeline schedule variable.
-
#delete_pipeline_schedule(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Delete a pipeline schedule.
-
#delete_pipeline_schedule_variable(project, pipeline_schedule_id, key, _options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Delete the variable of a pipeline schedule.
-
#edit_pipeline_schedule(project, pipeline_schedule_id, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Updates the pipeline schedule of a project.
-
#edit_pipeline_schedule_variable(project, pipeline_schedule_id, key, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Updates the variable of a pipeline schedule.
-
#pipeline_schedule(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single pipeline schedule.
-
#pipeline_schedule_take_ownership(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Take ownership of a pipeline schedule.
-
#pipeline_schedules(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project pipeline schedules.
-
#pipelines_by_pipeline_schedule(project, id) ⇒ Array<Gitlab::ObjectifiedHash>
Get all pipelines triggered by a pipeline schedule.
-
#run_pipeline_schedule(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Run a scheduled pipeline immediately.
Instance Method Details
#create_pipeline_schedule(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Create a pipeline schedule.
58 59 60 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 58 def create_pipeline_schedule(project, = {}) post("/projects/#{url_encode project}/pipeline_schedules", body: ) end |
#create_pipeline_schedule_variable(project, pipeline_schedule_id, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Create a pipeline schedule variable.
127 128 129 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 127 def create_pipeline_schedule_variable(project, pipeline_schedule_id, = {}) post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables", body: ) end |
#delete_pipeline_schedule(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Delete a pipeline schedule.
112 113 114 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 112 def delete_pipeline_schedule(project, pipeline_schedule_id) delete("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}") end |
#delete_pipeline_schedule_variable(project, pipeline_schedule_id, key, _options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Delete the variable of a pipeline schedule
155 156 157 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 155 def delete_pipeline_schedule_variable(project, pipeline_schedule_id, key, = {}) delete("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables/#{url_encode key}") end |
#edit_pipeline_schedule(project, pipeline_schedule_id, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Updates the pipeline schedule of a project.
76 77 78 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 76 def edit_pipeline_schedule(project, pipeline_schedule_id, = {}) put("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}", body: ) end |
#edit_pipeline_schedule_variable(project, pipeline_schedule_id, key, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Updates the variable of a pipeline schedule.
142 143 144 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 142 def edit_pipeline_schedule_variable(project, pipeline_schedule_id, key, = {}) put("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables/#{url_encode key}", body: ) end |
#pipeline_schedule(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single pipeline schedule.
29 30 31 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 29 def pipeline_schedule(project, id) get("/projects/#{url_encode project}/pipeline_schedules/#{id}") end |
#pipeline_schedule_take_ownership(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Take ownership of a pipeline schedule.
88 89 90 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 88 def pipeline_schedule_take_ownership(project, pipeline_schedule_id) post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/take_ownership") end |
#pipeline_schedules(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of project pipeline schedules.
17 18 19 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 17 def pipeline_schedules(project, = {}) get("/projects/#{url_encode project}/pipeline_schedules", query: ) end |
#pipelines_by_pipeline_schedule(project, id) ⇒ Array<Gitlab::ObjectifiedHash>
Get all pipelines triggered by a pipeline schedule
41 42 43 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 41 def pipelines_by_pipeline_schedule(project, id) get("/projects/#{url_encode project}/pipeline_schedules/#{id}/pipelines") end |
#run_pipeline_schedule(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Run a scheduled pipeline immediately.
100 101 102 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 100 def run_pipeline_schedule(project, pipeline_schedule_id) post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/play") end |