feat(pipeline): add semantic-release plugin and update container image for semantic releasing stage
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
7a11900023
commit
0b54a77d9e
@ -5,6 +5,7 @@ class SemanticReleasingExecutor {
|
|||||||
def workspace
|
def workspace
|
||||||
def config
|
def config
|
||||||
def plugins = [
|
def plugins = [
|
||||||
|
'semantic-release',
|
||||||
'@semantic-release/git',
|
'@semantic-release/git',
|
||||||
'@semantic-release/changelog',
|
'@semantic-release/changelog',
|
||||||
'@semantic-release/exec',
|
'@semantic-release/exec',
|
||||||
|
|||||||
@ -241,18 +241,6 @@ def generateComponentStages(component, configurations) {
|
|||||||
|
|
||||||
if (component.semanticReleaseEnabled != null && component.semanticReleaseEnabled) {
|
if (component.semanticReleaseEnabled != null && component.semanticReleaseEnabled) {
|
||||||
stages.addAll([
|
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
|
// Semantic Releasing
|
||||||
stage("${component.name} :: Semantic Releasing") {
|
stage("${component.name} :: Semantic Releasing") {
|
||||||
podTemplate(
|
podTemplate(
|
||||||
@ -260,7 +248,7 @@ def generateComponentStages(component, configurations) {
|
|||||||
containers: [
|
containers: [
|
||||||
containerTemplate(
|
containerTemplate(
|
||||||
name: 'semantic-releasing',
|
name: 'semantic-releasing',
|
||||||
image: env.semanticReleasingContainerImage,
|
image: 'node:18-bullseye-slim',
|
||||||
ttyEnabled: true,
|
ttyEnabled: true,
|
||||||
command: 'sleep',
|
command: 'sleep',
|
||||||
args: 'infinity'
|
args: 'infinity'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user