diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-14 07:35:27 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-14 07:35:27 +0000 |
commit | da66c90b0f154452d7fe7ea9a6d296466cb7f223 (patch) | |
tree | f85deab1b2ad3ab59929193b80d2e343228cc0ab /app/serializers | |
parent | 0037cf634dbcc8045fba9cbc28133cfde07dc97c (diff) | |
parent | 25b99a5b3beecb7251fef9097c44afd1f82f9f57 (diff) | |
download | gitlab-ce-da66c90b0f154452d7fe7ea9a6d296466cb7f223.tar.gz |
Merge branch 'fix-external-ci-services' into 'master'
Allow to access statuses for external CI services
Closes #30714, #29369, and #15220
See merge request !11176
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/build_details_entity.rb | 2 | ||||
-rw-r--r-- | app/serializers/build_serializer.rb | 2 | ||||
-rw-r--r-- | app/serializers/deployment_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/job_entity.rb (renamed from app/serializers/build_entity.rb) | 4 | ||||
-rw-r--r-- | app/serializers/job_group_entity.rb | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 0eddbaaaebf..cb6d3dfec89 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -1,4 +1,4 @@ -class BuildDetailsEntity < BuildEntity +class BuildDetailsEntity < JobEntity expose :coverage, :erased_at, :duration expose :tag_list, as: :tags expose :user, using: UserEntity diff --git a/app/serializers/build_serializer.rb b/app/serializers/build_serializer.rb index 79b67001199..bae9932847f 100644 --- a/app/serializers/build_serializer.rb +++ b/app/serializers/build_serializer.rb @@ -1,5 +1,5 @@ class BuildSerializer < BaseSerializer - entity BuildEntity + entity JobEntity def represent_status(resource) data = represent(resource, { only: [:status] }) diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb index 8b3de1bed0f..e493c9162fd 100644 --- a/app/serializers/deployment_entity.rb +++ b/app/serializers/deployment_entity.rb @@ -24,6 +24,6 @@ class DeploymentEntity < Grape::Entity expose :user, using: UserEntity expose :commit, using: CommitEntity - expose :deployable, using: BuildEntity - expose :manual_actions, using: BuildEntity + expose :deployable, using: JobEntity + expose :manual_actions, using: JobEntity end diff --git a/app/serializers/build_entity.rb b/app/serializers/job_entity.rb index 67001f4547d..d6de43bcbcb 100644 --- a/app/serializers/build_entity.rb +++ b/app/serializers/job_entity.rb @@ -1,11 +1,11 @@ -class BuildEntity < Grape::Entity +class JobEntity < Grape::Entity include RequestAwareEntity expose :id expose :name expose :build_path do |build| - path_to(:namespace_project_job, build) + build.target_url || path_to(:namespace_project_job, build) end expose :retry_path, if: -> (*) { retryable? } do |build| diff --git a/app/serializers/job_group_entity.rb b/app/serializers/job_group_entity.rb index 04487e59009..8554de55517 100644 --- a/app/serializers/job_group_entity.rb +++ b/app/serializers/job_group_entity.rb @@ -4,7 +4,7 @@ class JobGroupEntity < Grape::Entity expose :name expose :size expose :detailed_status, as: :status, with: StatusEntity - expose :jobs, with: BuildEntity + expose :jobs, with: JobEntity private |