Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/pipeline/chain/populate.rb')
-rw-r--r--lib/gitlab/ci/pipeline/chain/populate.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/populate.rb b/lib/gitlab/ci/pipeline/chain/populate.rb
index 3a40c7b167c..f9ae37aa273 100644
--- a/lib/gitlab/ci/pipeline/chain/populate.rb
+++ b/lib/gitlab/ci/pipeline/chain/populate.rb
@@ -17,7 +17,7 @@ module Gitlab
#
pipeline.stages = @command.stage_seeds.map(&:to_resource)
- if pipeline.stages.none?
+ if stage_names.empty?
return error('No stages / jobs for this pipeline.')
end
@@ -31,6 +31,15 @@ module Gitlab
def break?
pipeline.errors.any?
end
+
+ private
+
+ def stage_names
+ # We filter out `.pre/.post` stages, as they alone are not considered
+ # a complete pipeline:
+ # https://gitlab.com/gitlab-org/gitlab/issues/198518
+ pipeline.stages.map(&:name) - ::Gitlab::Ci::Config::EdgeStagesInjector::EDGES
+ end
end
end
end