可视化创建流水线后端代码

This commit is contained in:
moshenglv
2021-01-12 10:23:26 +08:00
parent 2f140d13f0
commit 77529319a1
23 changed files with 1147 additions and 1 deletions

View 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

View 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

View 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

View 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