fix(pipeline): replace parallel execution with sequential logging for component stages

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-10 07:35:11 +08:00
parent 36f4604e6a
commit 35549617ce
2 changed files with 10 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class SemanticReleasingExecutor {
steps.sh "semantic-release"
steps.log.info("SemanticReleasingExecutor", "Semantic release completed, read latest version from VERSION file")
steps.env.LATEST_VERSION = steps.readFile('VERSION').trim()
steps.env.SEMANTIC_RELEASED = true
}
}
}

View File

@ -263,6 +263,11 @@ def generateComponentStages(component, configurations) {
if (component.semanticReleaseEnabled != null && component.semanticReleaseEnabled) {
log.info("Pipeline", "Semantic releasing has enabled, releasing...")
if (env.SEMANTIC_RELEASED != null && !env.SEMANTIC_RELEASED.isEmpty() && env.SEMANTIC_RELEASED) {
log.info("Pipeline", "Semantic release has been executed, skipping...")
return
}
def sourceFetcher = new SourceFetcher(this)
sourceFetcher.fetch(configurations)
@ -559,7 +564,10 @@ spec:
def componentStages = configurations.components.collectEntries { component ->
["Generated Stage :: ${component.name}": generateComponentStages(component, configurations)]
}
parallel componentStages
for (stage in componentStages) {
log.info("Pipeline", "Executing ${stage.key}...")
stage.value()
}
}
}
}