lib/gitlab/client/pipeline_schedules.rb in gitlab-4.17.0 vs lib/gitlab/client/pipeline_schedules.rb in gitlab-4.18.0
- old
+ new
@@ -75,9 +75,21 @@
# @return [Gitlab::ObjectifiedHash] The updated pipeline schedule.
def pipeline_schedule_take_ownership(project, pipeline_schedule_id)
post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/take_ownership")
end
+ # Run a scheduled pipeline immediately.
+ #
+ # @example
+ # Gitlab.run_pipeline_schedule(5, 1)
+ #
+ # @param [Integer, String] project The ID or name of a project.
+ # @param [Integer] trigger_id The pipeline schedule ID.
+ # @return [Gitlab::ObjectifiedHash] Pipeline created message.
+ def run_pipeline_schedule(project, pipeline_schedule_id)
+ post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/play")
+ end
+
# Delete a pipeline schedule.
#
# @example
# Gitlab.delete_pipeline_schedule(5, 1)
#