diff options
author | Steve Azzopardi <steveazz@outlook.com> | 2018-10-15 09:26:01 +0300 |
---|---|---|
committer | Steve Azzopardi <steveazz@outlook.com> | 2018-10-15 15:14:47 +0300 |
commit | 5d11f55f7672c9ac2852a354dc03e9914f0c4312 (patch) | |
tree | b58b72257c35441726803af536f0dbd0d5c93186 /app | |
parent | fbec87b4b578f048408d4b969ad8db3f3a51f22e (diff) |
Send deployment_status when job starts environment
The check was if the job `has_environment` which results into showing
the environment information when the job stops the environment. This
result into having a blank `deployment_status`.
Use `starts_environment?` to be the same as the haml we have in 11.3
https://gitlab.com/gitlab-org/gitlab-ce/blob/30f019dca78bb64bcb8b355a267be006884e6d8f/app/views/projects/jobs/show.html.haml#L28
Diffstat (limited to 'app')
-rw-r--r-- | app/serializers/build_details_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 3d508a9a407..8220a11f454 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -8,7 +8,7 @@ class BuildDetailsEntity < JobEntity expose :runner, using: RunnerEntity expose :pipeline, using: PipelineEntity - expose :deployment_status, if: -> (*) { build.has_environment? } do + expose :deployment_status, if: -> (*) { build.starts_environment? } do expose :deployment_status, as: :status expose :persisted_environment, as: :environment, with: EnvironmentEntity |