From 0b54a77d9e9a4a0b2cd6d26268d583b6f50c1fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Fri, 7 Feb 2025 18:26:19 +0800 Subject: [PATCH] feat(pipeline): add semantic-release plugin and update container image for semantic releasing stage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- .../devops/SemanticReleasingExecutor.groovy | 1 + .../vars/executeFreeleapsPipeline.groovy | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index 169d61d6..4656615c 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -5,6 +5,7 @@ class SemanticReleasingExecutor { def workspace def config def plugins = [ + 'semantic-release', '@semantic-release/git', '@semantic-release/changelog', '@semantic-release/exec', diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index f0f79783..69355ebb 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -241,18 +241,6 @@ def generateComponentStages(component, configurations) { if (component.semanticReleaseEnabled != null && component.semanticReleaseEnabled) { stages.addAll([ - // Semantic Release Environment Preparation - stage("${component.name} :: Semantic Release Preparation") { - script { - if (env.executeMode == "fully" || env.changedComponents.contains(component.name)) { - if (component.semanticReleaseEnabled != null && component.semanticReleaseEnabled) { - log.info("Pipeline", "Semantic releasing has enabled, preparing semantic release environment...") - - env.semanticReleasingContainerImage = "docker.io/semantic-release/semantic-release:latest" - } - } - } - }, // Semantic Releasing stage("${component.name} :: Semantic Releasing") { podTemplate( @@ -260,7 +248,7 @@ def generateComponentStages(component, configurations) { containers: [ containerTemplate( name: 'semantic-releasing', - image: env.semanticReleasingContainerImage, + image: 'node:18-bullseye-slim', ttyEnabled: true, command: 'sleep', args: 'infinity'