diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-11-15 11:19:04 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-11-15 11:19:04 +0000 |
commit | 09490fd0ef5717b28af3f23b85d7887c282883d7 (patch) | |
tree | d450b233ea391e92443eb890f095a444f2617871 /app/models/concerns/deployable.rb | |
parent | b7cedd91e5ec07461b25f3920ae6cf2b00f3d84e (diff) | |
download | gitlab-ce-09490fd0ef5717b28af3f23b85d7887c282883d7.tar.gz |
Ignore environment validation failure
Diffstat (limited to 'app/models/concerns/deployable.rb')
-rw-r--r-- | app/models/concerns/deployable.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/deployable.rb b/app/models/concerns/deployable.rb index 85db01af18d..bc12b06b5af 100644 --- a/app/models/concerns/deployable.rb +++ b/app/models/concerns/deployable.rb @@ -13,6 +13,10 @@ module Deployable name: expanded_environment_name ) + # If we failed to persist envirionment record by validation error, such as name with invalid character, + # the job will fall back to a non-environment job. + return unless environment.persisted? + create_deployment!( project_id: environment.project_id, environment: environment, |