diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-27 12:08:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-27 12:08:35 +0000 |
commit | 22e9af3c8b8aedf7f46b786be968862b74a2d07e (patch) | |
tree | a10a7d9af40a17fe6cda7b3a681f5e5e2112c16e /lib/gitlab/ci | |
parent | c8e28a0bb8dd45d91cb72ff2c930bc4a562f1fc7 (diff) | |
download | gitlab-ce-22e9af3c8b8aedf7f46b786be968862b74a2d07e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/pipeline/chain/populate.rb | 11 |
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 |