Class: Gitlab::Ci::ProjectConfig::Source
- Inherits:
-
Object
- Object
- Gitlab::Ci::ProjectConfig::Source
show all
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/project_config/source.rb
Instance Method Summary
collapse
Constructor Details
#initialize(project:, sha:, custom_content: nil, pipeline_source: nil, pipeline_source_bridge: nil, triggered_for_branch: false, ref: nil, inputs: {}) ⇒ Source
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/gitlab/ci/project_config/source.rb', line 9
def initialize(
project:, sha:, custom_content: nil, pipeline_source: nil, pipeline_source_bridge: nil,
triggered_for_branch: false, ref: nil, inputs: {})
@project = project
@sha = sha
@custom_content = custom_content
@pipeline_source = pipeline_source
@pipeline_source_bridge = pipeline_source_bridge
@triggered_for_branch = triggered_for_branch
@ref = ref
@inputs = inputs
end
|
Instance Method Details
#content ⇒ Object
28
29
30
|
# File 'lib/gitlab/ci/project_config/source.rb', line 28
def content
raise NotImplementedError
end
|
#exists? ⇒ Boolean
22
23
24
25
26
|
# File 'lib/gitlab/ci/project_config/source.rb', line 22
def exists?
strong_memoize(:exists) do
content.present?
end
end
|
45
46
47
48
|
# File 'lib/gitlab/ci/project_config/source.rb', line 45
def inputs_for_pipeline_creation
internal_include_prepended? ? {} : inputs
end
|
#internal_include_prepended? ⇒ Boolean
Indicates if we are prepending the content with an “internal” include
33
34
35
|
# File 'lib/gitlab/ci/project_config/source.rb', line 33
def internal_include_prepended?
false
end
|
#source ⇒ Object
37
38
39
|
# File 'lib/gitlab/ci/project_config/source.rb', line 37
def source
raise NotImplementedError
end
|
#url ⇒ Object
41
42
43
|
# File 'lib/gitlab/ci/project_config/source.rb', line 41
def url
nil
end
|