Describe the solution you'd like
Each step is a independent PR
Step 1: create BlueprintSetting struct to represent user input from config-ui, provide proper api and save/load to/from db
Step 2: auto generate tasks when save to db
Blueprint setting json
{
"ID": 0,
"name": "MY BLUEPRINT",
"tasks": [
[]
],
"settings": {
"version": "1.0",
"connections": [
{
"connectionId": 1,
"plugin": "github",
"scope": [
{
"options": {
"owner": "merico-dev",
"repo": "lake"
},
"entities": [
"code",
"ticket"
],
"transformation": {
"prType": "type/(.*)$",
"prComponent": "component/(.*)$",
"issueSeverity": "severity/(.*)$",
"issueComponent": "component/(.*)$",
"issuePriority": "^(highest|high|medium|low)$",
"issueTypeRequirement": "^(feat|feature|proposal|requirement)$",
"issueTypeBug": "^(bug|failure|error)$",
"issueTypeIncident": ""
}
},
{
"options": {
"owner": "merico-dev",
"repo": "lake"
},
"entities": [
"code",
"ticket"
],
"transformation": {
"prType": "type/(.*)$",
"prComponent": "component/(.*)$",
"issueSeverity": "severity/(.*)$",
"issueComponent": "component/(.*)$",
"issuePriority": "^(highest|high|medium|low)$",
"issueTypeRequirement": "^(feat|feature|proposal|requirement)$",
"issueTypeBug": "^(bug|failure|error)$",
"issueTypeIncident": ""
}
}
]
},
{
"connectionId": 1,
"plugin": "gitlab",
"scope": [
{
"options": {
"projectId": "1000"
},
"entities": [
"code",
"ticket"
],
"transformation": {}
},
{
"options": {
"projectId": "2000"
},
"entities": [
"code",
"ticket"
],
"transformation": {}
}
]
},
{
"connectionId": 1,
"plugin": "jenkins",
"scope": [
{
"transformation": {},
"options": {},
"entities": [
"devops"
]
}
]
}
]
},
"cronConfig": "0 0 * * *",
"enable": true
}
this BlueprintSetting should be easily utilized by config-ui.
And it would be convert to tasks before creating pipeline.
Either when saving to database or right before pipeline triggering.
Describe the solution you'd like
Each step is a independent PR
Step 1: create
BlueprintSettingstruct to represent user input fromconfig-ui, provide proper api and save/load to/from dbStep 2: auto generate
taskswhen save to dbBlueprint setting json
{ "ID": 0, "name": "MY BLUEPRINT", "tasks": [ [] ], "settings": { "version": "1.0", "connections": [ { "connectionId": 1, "plugin": "github", "scope": [ { "options": { "owner": "merico-dev", "repo": "lake" }, "entities": [ "code", "ticket" ], "transformation": { "prType": "type/(.*)$", "prComponent": "component/(.*)$", "issueSeverity": "severity/(.*)$", "issueComponent": "component/(.*)$", "issuePriority": "^(highest|high|medium|low)$", "issueTypeRequirement": "^(feat|feature|proposal|requirement)$", "issueTypeBug": "^(bug|failure|error)$", "issueTypeIncident": "" } }, { "options": { "owner": "merico-dev", "repo": "lake" }, "entities": [ "code", "ticket" ], "transformation": { "prType": "type/(.*)$", "prComponent": "component/(.*)$", "issueSeverity": "severity/(.*)$", "issueComponent": "component/(.*)$", "issuePriority": "^(highest|high|medium|low)$", "issueTypeRequirement": "^(feat|feature|proposal|requirement)$", "issueTypeBug": "^(bug|failure|error)$", "issueTypeIncident": "" } } ] }, { "connectionId": 1, "plugin": "gitlab", "scope": [ { "options": { "projectId": "1000" }, "entities": [ "code", "ticket" ], "transformation": {} }, { "options": { "projectId": "2000" }, "entities": [ "code", "ticket" ], "transformation": {} } ] }, { "connectionId": 1, "plugin": "jenkins", "scope": [ { "transformation": {}, "options": {}, "entities": [ "devops" ] } ] } ] }, "cronConfig": "0 0 * * *", "enable": true }this
BlueprintSettingshould be easily utilized byconfig-ui.And it would be convert to
tasksbefore creatingpipeline.Either when saving to database or right before
pipelinetriggering.