fix(pipeline): refactor stage generation to use closures for improved parallel execution
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
5939235d41
commit
87f68cbd95
@ -440,7 +440,11 @@ def generateComponentStages(component, configurations) {
|
||||
}
|
||||
}
|
||||
])
|
||||
return stages
|
||||
return {
|
||||
stages.each { stage ->
|
||||
stage.call()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def call(Closure closure) {
|
||||
@ -547,9 +551,10 @@ spec:
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
configurations.components.each { component ->
|
||||
parallel generateComponentStages(component, configurations)
|
||||
def componentStages = configurations.components.collectEntries { component ->
|
||||
["Generated Stage :: ${component}": generateComponentStages(component, configurations)]
|
||||
}
|
||||
parallel componentStages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user