Class: Gitlab::Ci::ProjectConfig::ProjectSetting
Instance Attribute Summary
Attributes inherited from Source
#pipeline_policy_context
Instance Method Summary
collapse
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from Source
#exists?, #initialize
Instance Method Details
#content ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/gitlab/ci/project_config/project_setting.rb', line 9
def content
case source
when :repository_source
ci_yaml_include({ 'local' => ci_config_path })
when :external_project_source
path_file, path_project, ref =
config_location = { 'project' => path_project, 'file' => path_file }
config_location['ref'] = ref if ref.present?
ci_yaml_include(config_location)
when :remote_source
ci_yaml_include({ 'remote' => ci_config_path })
end
end
|
#internal_include_prepended? ⇒ Boolean
26
27
28
|
# File 'lib/gitlab/ci/project_config/project_setting.rb', line 26
def internal_include_prepended?
true
end
|
#source ⇒ Object
30
31
32
33
34
35
36
37
38
|
# File 'lib/gitlab/ci/project_config/project_setting.rb', line 30
def source
if remote_config_path?
:remote_source
elsif external_project_path?
:external_project_source
elsif file_in_repository?
:repository_source
end
end
|
#url ⇒ Object
42
43
44
45
46
|
# File 'lib/gitlab/ci/project_config/project_setting.rb', line 42
def url
return unless source == :repository_source
File.join(Settings.build_ci_server_fqdn, project.full_path, '//', ci_config_path)
end
|