diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 15:07:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 15:07:56 +0000 |
commit | 016af097cb1fa872fdc28a786d16315e55cd2701 (patch) | |
tree | 76f97f90a8048685efb3eb0c543b3a75d99be6ee /app/services/deployments/update_service.rb | |
parent | 00b8ecb72c9f77d864aff3572f028613f45af03c (diff) | |
download | gitlab-ce-016af097cb1fa872fdc28a786d16315e55cd2701.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/deployments/update_service.rb')
-rw-r--r-- | app/services/deployments/update_service.rb | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/app/services/deployments/update_service.rb b/app/services/deployments/update_service.rb index 97b233f16a7..b8f8740c9b9 100644 --- a/app/services/deployments/update_service.rb +++ b/app/services/deployments/update_service.rb @@ -10,22 +10,7 @@ module Deployments end def execute - # A regular update() does not trigger the state machine transitions, which - # we need to ensure merge requests are linked when changing the status to - # success. To work around this we use this case statment, using the right - # event methods to trigger the transition hooks. - case params[:status] - when 'running' - deployment.run - when 'success' - deployment.succeed - when 'failed' - deployment.drop - when 'canceled' - deployment.cancel - else - false - end + deployment.update_status(params[:status]) end end end |