From 8916623c4c6d44d03614b6b99839bfeea1ec9bcd Mon Sep 17 00:00:00 2001 From: zhenyus Date: Tue, 18 Feb 2025 06:10:59 +0800 Subject: [PATCH] fix(argo): invalid env ref for ArgoApplicationVersionUpdater Signed-off-by: zhenyus --- .../src/com/freeleaps/devops/SemanticReleasingExecutor.groovy | 3 ++- first-class-pipeline/vars/executeFreeleapsPipeline.groovy | 2 +- 2 files 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 1e40e315..03870241 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -19,13 +19,14 @@ class SemanticReleasingExecutor { this.config = 'com/freeleaps/devops/builtins/semantic-release/releaserc.json' } - def release(credentialsId) { + def release(credentialsId, branch) { steps.log.warn("SemanticReleasingExecutor", "Configuration file customization is not supported yet, using builtin release rules as fallback") steps.log.info("SemanticReleasingExecutor", "Releasing with config: ${config}") steps.dir(steps.env.workroot) { steps.withCredentials([steps.usernamePassword(credentialsId: credentialsId, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { steps.env.GIT_CREDENTIALS = "${steps.env.GIT_USERNAME}:${steps.env.GIT_PASSWORD}"- + steps.env.GIT_BRANCH = branch steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") steps.sh "apt-get -y update && apt-get install -y --no-install-recommends git apt-transport-https ca-certificates curl wget gnupg" steps.writeFile file: '.releaserc.json', text: steps.libraryResource(config) diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index 066c61de..f610f386 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -273,7 +273,7 @@ def generateComponentStages(component, configurations) { sourceFetcher.fetch(configurations) def semanticReleasingExecutor = new SemanticReleasingExecutor(this, env.workroot) - semanticReleasingExecutor.release(configurations.serviceGitCredentialsId) + semanticReleasingExecutor.release(configurations.serviceGitCredentialsId, configurations.serviceGitBranch) } } }