refactor(executeFreeleapsPipeline): update build agent image to 'node:lts' and improve error handling in generateComponentStages function

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-04 15:05:19 +08:00
parent 43dbb2b7cd
commit 2725cd823d
2 changed files with 19 additions and 17 deletions

View File

@ -15,7 +15,7 @@ executeFreeleapsPipeline {
language: 'javascript',
dependenciesManager: 'npm',
npmPackageJsonFile: 'package.json',
buildAgentImage: 'node:lts-alpine',
buildAgentImage: 'node:lts',
buildCacheEnabled: true,
buildCommand: 'npm run build',
lintEnabled: true,

View File

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