Class: Ci::PipelineCreation::StartPipelineService
- Inherits:
-
Object
- Object
- Ci::PipelineCreation::StartPipelineService
- Defined in:
- app/services/ci/pipeline_creation/start_pipeline_service.rb
Instance Attribute Summary collapse
-
#pipeline ⇒ Object
readonly
Returns the value of attribute pipeline.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(pipeline) ⇒ StartPipelineService
constructor
A new instance of StartPipelineService.
Constructor Details
#initialize(pipeline) ⇒ StartPipelineService
Returns a new instance of StartPipelineService.
8 9 10 |
# File 'app/services/ci/pipeline_creation/start_pipeline_service.rb', line 8 def initialize(pipeline) @pipeline = pipeline end |
Instance Attribute Details
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
6 7 8 |
# File 'app/services/ci/pipeline_creation/start_pipeline_service.rb', line 6 def pipeline @pipeline end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/services/ci/pipeline_creation/start_pipeline_service.rb', line 12 def execute ## # Create a persistent ref for the pipeline. # The pipeline ref is fetched in the jobs and deleted when the pipeline transitions to a finished state. pipeline.ensure_persistent_ref Ci::ProcessPipelineService.new(pipeline).execute end |