class WarpEngine::Api::Ci::PipelinesController
Lists the tracked CI pipelines and reports their latest run.
Public Instance Methods
Source
# File app/controllers/warp_engine/api/ci/pipelines_controller.rb, line 17 def index pipelines = pipeline_scope.active.includes(:software) render json: WarpEngine::PipelineSerializer.render_as_hash(pipelines) end
GET /api/ci/pipelines.
Renders the active pipelines as a JSON array through WarpEngine::PipelineSerializer.
Source
# File app/controllers/warp_engine/api/ci/pipelines_controller.rb, line 31 def show pipeline = pipeline_scope.find(params[:id]) render json: { pipeline: WarpEngine::PipelineSerializer.render_as_hash(pipeline), latestRun: latest_run(pipeline) } end