feat(pipeline): add semantic-release plugin and update container image for semantic releasing stage

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-07 18:26:19 +08:00
parent 7a11900023
commit 0b54a77d9e
2 changed files with 2 additions and 13 deletions

View File

@ -5,6 +5,7 @@ class SemanticReleasingExecutor {
def workspace
def config
def plugins = [
'semantic-release',
'@semantic-release/git',
'@semantic-release/changelog',
'@semantic-release/exec',

View File

@ -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'