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.
-
#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.
46 47 48 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 46 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.
115 116 117 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 115 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.
100 101 102 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 100 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
143 144 145 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 143 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.
64 65 66 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 64 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.
130 131 132 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 130 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.
76 77 78 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 76 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 |
#run_pipeline_schedule(project, pipeline_schedule_id) ⇒ Gitlab::ObjectifiedHash
Run a scheduled pipeline immediately.
88 89 90 |
# File 'lib/gitlab/client/pipeline_schedules.rb', line 88 def run_pipeline_schedule(project, pipeline_schedule_id) post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/play") end |