From e1bdb89ce6035ab48e8839e691c6b9109f2b716e Mon Sep 17 00:00:00 2001 From: zhenyus Date: Tue, 18 Feb 2025 05:27:21 +0800 Subject: [PATCH] fix(semantic-release): add additional branch filter for rules Signed-off-by: zhenyus --- .../com/freeleaps/devops/SemanticReleasingExecutor.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index fe95124f..0243765a 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -34,6 +34,9 @@ class SemanticReleasingExecutor { steps.log.info("SemanticReleasingExecutor", "Installing semantic-release plugins...") steps.sh "npm install -g ${plugins.join(' ')}" steps.sh "git config --global --add safe.directory ${steps.env.workroot}" + // TODO: Workaround for semantic-release not committing changes + steps.sh "git config user.name \"freeleaps-gitops-bot\"" + steps.sh "git config user.email \"gitops@mathmast.com\"" steps.sh "semantic-release --debug --no-ci" steps.log.info("SemanticReleasingExecutor", "Semantic release completed, read latest version from VERSION file") def released = steps.sh(script: 'test -f "VERSION"', returnStatus: true) == 0 @@ -41,8 +44,6 @@ class SemanticReleasingExecutor { steps.env.LATEST_VERSION = steps.readFile('VERSION').trim() steps.env.SEMANTIC_RELEASED = true // TODO: Workaround for semantic-release not committing changes - steps.sh "git config user.name \"freeleaps-gitops-bot\"" - steps.sh "git config user.email \"gitops@mathmast.com\"" def repoUrl = steps.sh(script: 'git config --get remote.origin.url', returnStdout: true).trim() steps.sh "git remote add ci_origin ${repoUrl}" steps.sh "git push ci_origin HEAD:master"