diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-07 15:11:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-07 15:11:26 +0300 |
commit | 325245c6f5803227b13051883d00da5b3c235ab0 (patch) | |
tree | dc30fdeb752d4699a27c2b45ba5992e77bf66ccc /lib/gitlab/ci/pipeline/seed | |
parent | 378308b6cde44eb1a320b9202ff8946a911f35f6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/pipeline/seed')
-rw-r--r-- | lib/gitlab/ci/pipeline/seed/build.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/ci/pipeline/seed/build.rb b/lib/gitlab/ci/pipeline/seed/build.rb index 934bf22d8ad..9ad5d6538b7 100644 --- a/lib/gitlab/ci/pipeline/seed/build.rb +++ b/lib/gitlab/ci/pipeline/seed/build.rb @@ -106,10 +106,15 @@ module Gitlab environment = Seed::Environment.new(build).to_resource - # If there is a validation error on environment creation, such as - # the name contains invalid character, the build falls back to a - # non-environment job. unless environment.persisted? + if Feature.enabled?(:surface_environment_creation_failure, build.project, default_enabled: :yaml) && + Feature.disabled?(:surface_environment_creation_failure_override, build.project) + return { status: :failed, failure_reason: :environment_creation_failure } + end + + # If there is a validation error on environment creation, such as + # the name contains invalid character, the build falls back to a + # non-environment job. Gitlab::ErrorTracking.track_exception( EnvironmentCreationFailure.new, project_id: build.project_id, |