Class: Ci::PlayManualStageService
- Inherits:
-
BaseService
- Object
- BaseService
- Ci::PlayManualStageService
- Defined in:
- app/services/ci/play_manual_stage_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
- #execute(stage) ⇒ Object
-
#initialize(project, current_user, params) ⇒ PlayManualStageService
constructor
A new instance of PlayManualStageService.
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(project, current_user, params) ⇒ PlayManualStageService
Returns a new instance of PlayManualStageService.
5 6 7 8 9 |
# File 'app/services/ci/play_manual_stage_service.rb', line 5 def initialize(project, current_user, params) super @pipeline = params[:pipeline] end |
Instance Method Details
#execute(stage) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/services/ci/play_manual_stage_service.rb', line 11 def execute(stage) stage.processables.manual.each do |processable| next unless processable.playable? processable.play(current_user) rescue Gitlab::Access::AccessDeniedError logger.error(message: 'Unable to play manual action', processable_id: processable.id) end end |