mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
可视化创建流水线后端代码
This commit is contained in:
14
db/migrate/20210108015318_create_ci_templates.rb
Normal file
14
db/migrate/20210108015318_create_ci_templates.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateCiTemplates < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :ci_templates do |t|
|
||||
t.string :template_name, null: false, comment: '模板名称'
|
||||
t.string :stage_type, null: false, comment: '模板所属阶段类型:init/build/deploy/customize/confirm'
|
||||
t.string :category, null: false, comment: '模板分类'
|
||||
t.text :content, null: false, comment: '模板yml内容'
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :ci_templates, [:stage_type]
|
||||
end
|
||||
end
|
||||
|
||||
11
db/migrate/20210108055023_create_ci_pipelines.rb
Normal file
11
db/migrate/20210108055023_create_ci_pipelines.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateCiPipelines < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :ci_pipelines do |t|
|
||||
t.string :pipeline_name, null: false, comment: '流水线名称'
|
||||
t.string :pipeline_status, null: false, comment: 'successed/failed/running/errored/pending/killed/unknown' , default: 'unknown'
|
||||
t.string :file_name, null: false, comment: '文件名称'
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
12
db/migrate/20210108062016_create_ci_pipeline_stages.rb
Normal file
12
db/migrate/20210108062016_create_ci_pipeline_stages.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateCiPipelineStages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :ci_pipeline_stages do |t|
|
||||
t.string :stage_name, null: false, comment: '阶段名称'
|
||||
t.string :stage_type, null: false, comment: '阶段类型:init/build/deploy/customize/confirm'
|
||||
t.integer :pipeline_id, null: false, comment: '阶段所属流水线id'
|
||||
t.integer :show_index, null: false, comment: '阶段排序', default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20210111013512_create_ci_pipeline_stage_steps.rb
Normal file
13
db/migrate/20210111013512_create_ci_pipeline_stage_steps.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateCiPipelineStageSteps < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :ci_pipeline_stage_steps do |t|
|
||||
t.string :step_name, null: false, comment: '步骤名称'
|
||||
t.integer :stage_id, null: false, comment: '阶段id'
|
||||
t.integer :template_id, comment: '模板id'
|
||||
t.text :content
|
||||
t.integer :show_index, null: false, comment: '阶段排序', default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user