Commit 67e46e6f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Integrate new stages into ci pipeline serializer

parent 0f40ae5f
...@@ -15,7 +15,7 @@ class PipelineEntity < Grape::Entity ...@@ -15,7 +15,7 @@ class PipelineEntity < Grape::Entity
expose :detailed_status, as: :status, using: StatusEntity expose :detailed_status, as: :status, using: StatusEntity
expose :duration expose :duration
expose :finished_at expose :finished_at
expose :stages_with_statuses, as: :stages, using: PipelineStageEntity expose :stages, using: PipelineStageEntity
expose :artifacts, using: PipelineArtifactEntity expose :artifacts, using: PipelineArtifactEntity
expose :manual_actions, using: PipelineActionEntity expose :manual_actions, using: PipelineActionEntity
end end
......
class PipelineStageEntity < Grape::Entity class PipelineStageEntity < Grape::Entity
include RequestAwareEntity include RequestAwareEntity
expose :name do |stage| expose :name
stage.name expose :detailed_status, as: :status, using: StatusEntity
end
expose :status do |stage|
stage.status || 'not found'
end
expose :url do |stage| expose :path do |stage|
namespace_project_pipeline_path( namespace_project_pipeline_path(
stage.pipeline.project.namespace, stage.pipeline.project.namespace,
stage.pipeline.project, stage.pipeline.project,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment