refactor(executeFreeleapsPipeline): restructure generateComponentStages to improve error handling and encapsulate steps within a script block

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-04 15:16:36 +08:00
parent 891d594ff1
commit 296d49f95c

View File

@ -48,6 +48,8 @@ def generateComponentStages(component, configurations) {
]
) {
node("dep-resolver-${component.name}") {
steps {
script {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
if (env.executeMode == "fully" || env.changedComponents.contains(component.name)) {
log.info("Pipeline", "Using ${env.buildAgentImage} as build agent image for dependencies resolving")
@ -72,6 +74,8 @@ def generateComponentStages(component, configurations) {
}
}
}
}
}
]
}