class WarpEngine::Api::Ci::PipelineRunsController
Starts runs of tracked CI pipelines. Needs the update credential in X-Update-Secret (see WarpEngine::UpdateAuthentication).
Public Instance Methods
Source
# File app/controllers/warp_engine/api/ci/pipeline_runs_controller.rb, line 29 def create unless update_authorized?(required_scope: WarpEngine::ApplicationToken::UPDATE_SCOPE) return render json: { error: "Unauthorized" }, status: :unauthorized end pipeline = pipeline_scope.find(params[:id]) result = WarpEngine::PipelineService.new.trigger(pipeline, branch: params[:branch].presence || "main") render json: { triggered: true, pipeline: result } end
POST /api/ci/pipelines/:id/trigger.
- id
-
the
WarpEngine::Pipelineid - branch
-
the branch to build,
mainby default
Triggers a run through WarpEngine::PipelineService and renders { "triggered": true, "pipeline": ... } with the CI’s run data. Responds 401 without a valid update credential and 404 for an unknown pipeline.