fix(pipeline): refactor stage generation to use closures for improved parallel execution

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-10 05:19:12 +08:00
parent 5939235d41
commit 87f68cbd95

View File

@ -440,7 +440,11 @@ def generateComponentStages(component, configurations) {
} }
} }
]) ])
return stages return {
stages.each { stage ->
stage.call()
}
}
} }
def call(Closure closure) { def call(Closure closure) {
@ -547,9 +551,10 @@ spec:
} }
steps { steps {
script { script {
configurations.components.each { component -> def componentStages = configurations.components.collectEntries { component ->
parallel generateComponentStages(component, configurations) ["Generated Stage :: ${component}": generateComponentStages(component, configurations)]
} }
parallel componentStages
} }
} }
} }