Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions backend/server/services/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,21 @@ func createPipelineByBlueprint(blueprint *models.Blueprint, syncPolicy *models.S
newPipeline.SyncPolicy = blueprint.SyncPolicy

// if the plan is empty, we should not create the pipeline
var shouldCreatePipeline bool
for _, stage := range plan {
for _, task := range stage {
switch task.Plugin {
case "org", "refdiff", "dora":
default:
if !plan.IsEmpty() {
shouldCreatePipeline = true
}
}
}
}
if !shouldCreatePipeline {
return nil, ErrEmptyPlan
}
// var shouldCreatePipeline bool
// for _, stage := range plan {
// for _, task := range stage {
// switch task.Plugin {
// case "org", "refdiff", "dora":
// default:
// if !plan.IsEmpty() {
// shouldCreatePipeline = true
// }
// }
// }
// }
// if !shouldCreatePipeline {
// return nil, ErrEmptyPlan
// }
pipeline, err := CreatePipeline(&newPipeline, false)
// Return all created tasks to the User
if err != nil {
Expand Down