fix(argo): invalid env ref for ArgoApplicationVersionUpdater

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-02-18 06:10:59 +08:00
parent 0d8287606e
commit 8916623c4c
2 changed files with 3 additions and 2 deletions

View File

@ -19,13 +19,14 @@ class SemanticReleasingExecutor {
this.config = 'com/freeleaps/devops/builtins/semantic-release/releaserc.json' 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.warn("SemanticReleasingExecutor", "Configuration file customization is not supported yet, using builtin release rules as fallback")
steps.log.info("SemanticReleasingExecutor", "Releasing with config: ${config}") steps.log.info("SemanticReleasingExecutor", "Releasing with config: ${config}")
steps.dir(steps.env.workroot) { steps.dir(steps.env.workroot) {
steps.withCredentials([steps.usernamePassword(credentialsId: credentialsId, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { 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_CREDENTIALS = "${steps.env.GIT_USERNAME}:${steps.env.GIT_PASSWORD}"-
steps.env.GIT_BRANCH = branch
steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") 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.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) steps.writeFile file: '.releaserc.json', text: steps.libraryResource(config)

View File

@ -273,7 +273,7 @@ def generateComponentStages(component, configurations) {
sourceFetcher.fetch(configurations) sourceFetcher.fetch(configurations)
def semanticReleasingExecutor = new SemanticReleasingExecutor(this, env.workroot) def semanticReleasingExecutor = new SemanticReleasingExecutor(this, env.workroot)
semanticReleasingExecutor.release(configurations.serviceGitCredentialsId) semanticReleasingExecutor.release(configurations.serviceGitCredentialsId, configurations.serviceGitBranch)
} }
} }
} }