Class: Ci::PipelineTriggerService

Inherits:
BaseService show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/ci/pipeline_trigger_service.rb

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from BaseService

#initialize

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

#can?

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#executeObject


7
8
9
10
11
12
13
14
15
16
# File 'app/services/ci/pipeline_trigger_service.rb', line 7

def execute
  if trigger_from_token
    create_pipeline_from_trigger(trigger_from_token)
  elsif job_from_token
    create_pipeline_from_job(job_from_token)
  end

rescue Ci::AuthJobFinder::AuthError => e
  error(e.message, 401)
end