Class: Gitlab::Ci::Pipeline::Chain::Populate
- Inherits:
-
Base
- Object
- Base
- Gitlab::Ci::Pipeline::Chain::Populate
show all
- Includes:
- Helpers
- Defined in:
- lib/gitlab/ci/pipeline/chain/populate.rb
Constant Summary
collapse
- PopulateError =
Class.new(StandardError)
Instance Attribute Summary
Attributes inherited from Base
#command, #config, #pipeline
Instance Method Summary
collapse
Methods included from Helpers
#error, #warning
Methods inherited from Base
#initialize
Instance Method Details
#break? ⇒ Boolean
32
33
34
|
# File 'lib/gitlab/ci/pipeline/chain/populate.rb', line 32
def break?
pipeline.errors.any?
end
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/gitlab/ci/pipeline/chain/populate.rb', line 12
def perform!
raise ArgumentError, 'missing pipeline seed' unless @command.pipeline_seed
pipeline.stages = @command.pipeline_seed.stages
if stage_names.empty?
return error('Pipeline will not run for the selected trigger. ' \
'The rules configuration prevented any jobs from being added to the pipeline.')
end
if pipeline.invalid?
return error('Failed to build the pipeline!')
end
raise Populate::PopulateError if pipeline.persisted?
end
|