From 4a068d9b9cdcdfadae20feae3ed905eeaff46a03 Mon Sep 17 00:00:00 2001 From: zhenyus Date: Tue, 18 Feb 2025 05:26:29 +0800 Subject: [PATCH] fix(semantic-release): add additional branch filter for rules Signed-off-by: zhenyus --- .../com/freeleaps/devops/SemanticReleasingExecutor.groovy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index 8409f366..fe95124f 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -40,6 +40,12 @@ class SemanticReleasingExecutor { if (released) { 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" } } }