class WarpEngine::Pipeline
A CI repository the engine tracks (table pipelines), mirrored from the CI server by WarpEngine::PipelineSyncService. Identified by the CI’s repository id (woodpecker_repo_id, also remote_repo_id), with the repository owner and name, its platform (a WarpEngine::Platform name or UNKNOWN_PLATFORM), whether it is active, and the last run’s status and time. It may be linked to the WarpEngine::Software it builds; a software belongs to one pipeline at most, so linking it takes it from the others. Scopes: active (kept and active) and by_remote_repo_id. Soft-deletable.
Constants
- UNKNOWN_PLATFORM
-
Platformvalue of a repository whose platform could not be determined.
Attributes
Full names of the pipelines the last save took the software from; empty or nil when it took none.
Public Class Methods
# File app/models/warp_engine/pipeline.rb, line 52 def self.find_or_initialize_by_remote_repo_id(id) find_or_initialize_by(woodpecker_repo_id: id) end
Returns the pipeline of the CI repository id, or a new unsaved one.
Public Instance Methods
Source
# File app/models/warp_engine/pipeline.rb, line 37 def full_name "#{repo_owner}/#{repo_name}" end
Returns owner/name of the repository.
Source
# File app/models/warp_engine/pipeline.rb, line 42 def remote_repo_id woodpecker_repo_id end
Returns the CI’s repository id.
Source
# File app/models/warp_engine/pipeline.rb, line 47 def remote_repo_id=(value) self.woodpecker_repo_id = value end
Sets the CI’s repository id.