Class: Ci::CreateWebIdeTerminalService
- Inherits:
-
BaseService
- Object
- BaseService
- Ci::CreateWebIdeTerminalService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/ci/create_web_ide_terminal_service.rb
Constant Summary collapse
- TerminalCreationError =
Class.new(StandardError)
- TERMINAL_NAME =
'terminal'
Instance Attribute Summary collapse
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
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
This class inherits a constructor from BaseService
Instance Attribute Details
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
11 12 13 |
# File 'app/services/ci/create_web_ide_terminal_service.rb', line 11 def terminal @terminal end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/services/ci/create_web_ide_terminal_service.rb', line 13 def execute check_access! validate_params! load_terminal_config! pipeline = create_pipeline! success(pipeline: pipeline) rescue TerminalCreationError => e error(e.) rescue ActiveRecord::RecordInvalid => e error("Failed to persist the pipeline: #{e.}") end |