mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
FIX 重构ci流程
This commit is contained in:
15
app/views/ci/builds/_build.json.jbuilder
Normal file
15
app/views/ci/builds/_build.json.jbuilder
Normal file
@@ -0,0 +1,15 @@
|
||||
json.id build.build_id
|
||||
json.repo_id build.build_repo_id
|
||||
json.number build.build_number
|
||||
json.status build.build_status
|
||||
json.event build.build_event
|
||||
json.action build.build_action
|
||||
# json.link build.build_link
|
||||
json.message build.build_message
|
||||
json.author build.build_author
|
||||
json.started format_utc_time build.build_started
|
||||
json.finished format_utc_time build.build_finished
|
||||
json.created format_utc_time build.build_created
|
||||
json.updated format_utc_time build.build_updated
|
||||
json.version build.build_version
|
||||
json.duration_time render_duartion_time(build.build_finished, build.build_started)
|
||||
22
app/views/ci/builds/_stage.json.jbuilder
Normal file
22
app/views/ci/builds/_stage.json.jbuilder
Normal file
@@ -0,0 +1,22 @@
|
||||
json.id stage.stage_id
|
||||
json.repo_id stage.stage_repo_id
|
||||
json.build_id stage.stage_build_id
|
||||
json.name stage.stage_name
|
||||
json.kind stage.stage_kind
|
||||
json.type stage.stage_type
|
||||
json.number stage.stage_number
|
||||
json.status stage.stage_status
|
||||
json.errignore stage.stage_errignore
|
||||
json.exit_code stage.stage_exit_code
|
||||
json.os stage.stage_os
|
||||
json.arch stage.stage_arch
|
||||
json.started format_utc_time(stage.stage_started)
|
||||
json.stopped format_utc_time(stage.stage_stoped)
|
||||
json.created format_utc_time(stage.stage_created)
|
||||
json.updated format_utc_time(stage.stage_updated)
|
||||
json.version stage.stage_version
|
||||
json.on_success stage.stage_on_success
|
||||
json.on_failure stage.stage_on_failure
|
||||
json.steps build.steps do |stage|
|
||||
json.partial! "/ci/builds/step", step: step
|
||||
end
|
||||
8
app/views/ci/builds/_step.json.jbuilder
Normal file
8
app/views/ci/builds/_step.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.id step.step_id
|
||||
json.number step.step_number
|
||||
json.name step.step_name
|
||||
json.status step.step_status
|
||||
json.exit_code step.step_exit_code
|
||||
json.started format_utc_time(step.step_started)
|
||||
json.stopped format_utc_time(step.step_stopped)
|
||||
json.version step.build_version
|
||||
4
app/views/ci/builds/index.json.jbuilder
Normal file
4
app/views/ci/builds/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.total_count @total_count
|
||||
json.builds @builds do |build|
|
||||
json.partial! "/ci/builds/build", build: build
|
||||
end
|
||||
4
app/views/ci/builds/show.json.jbuilder
Normal file
4
app/views/ci/builds/show.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.partial! "/ci/builds/build", build: @build
|
||||
json.stages @build.stages do |stage|
|
||||
json.partial! "/ci/builds/stage", stage: stage
|
||||
end
|
||||
6
app/views/ci/languages/common.json.jbuilder
Normal file
6
app/views/ci/languages/common.json.jbuilder
Normal file
@@ -0,0 +1,6 @@
|
||||
json.array! @languages do |lang|
|
||||
json.id lang.id
|
||||
json.name lang.name
|
||||
json.content render_base64_decoded lang.content
|
||||
json.cover_url lang.cover_id.present? ? download_url(lang.cover) : nil
|
||||
end
|
||||
6
app/views/ci/languages/index.json.jbuilder
Normal file
6
app/views/ci/languages/index.json.jbuilder
Normal file
@@ -0,0 +1,6 @@
|
||||
json.array! @languages do |lang|
|
||||
json.id lang.id
|
||||
json.name lang.name
|
||||
json.content render_base64_decoded lang.content
|
||||
json.cover_url lang.cover_id.present? ? download_url(lang.cover) : nil
|
||||
end
|
||||
4
app/views/ci/languages/show.json.jbuilder
Normal file
4
app/views/ci/languages/show.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.id @language.id
|
||||
json.name @language.name
|
||||
json.content render_base64_decoded @language.content
|
||||
json.cover_url @language.cover_id.present? ? download_url(@language.cover) : nil
|
||||
Reference in New Issue
Block a user