fix(pipeline): update credentials handling in SemanticReleasingExecutor to use usernamePassword method

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-08 10:39:21 +08:00
parent 87b8cbb377
commit 4ddf5df588
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class SemanticReleasingExecutor {
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(credentialsId: credentialsId, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME') { steps.withCredentials([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.writeFile file: 'releaserc.json', text: steps.libraryResource(config) steps.writeFile file: 'releaserc.json', text: steps.libraryResource(config)
steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...")

View File

@ -518,7 +518,7 @@ spec:
steps { steps {
script { script {
configurations.components.each { component -> configurations.components.each { component ->
generateComponentStages(component, configurations) parallel generateComponentStages(component, configurations)
} }
} }
} }