diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index 86ea92c1..73bb8d81 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -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 } } } diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index e2592a86..97ea27c2 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -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() + } } } }