diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
commit | cfc792b9ca064990e6540cb742e80529ea669a81 (patch) | |
tree | 147cd4256319990cebbc02fe8e4fbbbe06f5720a /app/services/deployments | |
parent | 93c6764dacd4c605027ef1cd367d3aebe420b223 (diff) | |
download | gitlab-ce-cfc792b9ca064990e6540cb742e80529ea669a81.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/deployments')
-rw-r--r-- | app/services/deployments/after_create_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/deployments/after_create_service.rb b/app/services/deployments/after_create_service.rb index e0a4e5419cc..1d9cb666cff 100644 --- a/app/services/deployments/after_create_service.rb +++ b/app/services/deployments/after_create_service.rb @@ -29,6 +29,7 @@ module Deployments environment.external_url = url end + renew_auto_stop_in environment.fire_state_event(action) if environment.save && !environment.stopped? @@ -63,6 +64,12 @@ module Deployments def action environment_options[:action] || 'start' end + + def renew_auto_stop_in + return unless deployable + + environment.auto_stop_in = deployable.environment_auto_stop_in + end end end |