Skip to content

Commit

Permalink
fix: skip non-built stages
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Nov 15, 2023
1 parent fb6c12c commit 989dbcb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions api/build/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,11 @@ func GetBuildGraph(c *gin.Context) {
cluster = BuiltInCluster
}

node := nodeFromStage(nodeID, cluster, stage, stageMap[stage.Name])
nodes[nodeID] = node
s, ok := stageMap[stage.Name]
if ok {
node := nodeFromStage(nodeID, cluster, stage, s)
nodes[nodeID] = node
}
}

// create single-step stages when no stages exist
Expand All @@ -455,8 +458,11 @@ func GetBuildGraph(c *gin.Context) {
// no built-in step separation for graphs without stages
cluster := PipelineCluster

node := nodeFromStage(nodeID, cluster, stage, stageMap[stage.Name])
nodes[nodeID] = node
s, ok := stageMap[stage.Name]
if ok {
node := nodeFromStage(nodeID, cluster, stage, s)
nodes[nodeID] = node
}
}
}

Expand Down

0 comments on commit 989dbcb

Please sign in to comment.