Skip to content

Commit

Permalink
bug: 定时触发插件检查SVN代码库最新版本时, 无需调用会话接口 TencentBlueKing#10096
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Mar 12, 2024
1 parent 2ffe554 commit de10e46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 233 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,8 @@ class ScmProxyService @Autowired constructor(private val client: Client) {
return Credential(
username = v1,
privateKey = session?.privateToken ?: "",
passPhrase = v2
passPhrase = v2,
svnToken = session?.privateToken ?: ""
)
}
// 按顺序封装凭证信息
Expand Down Expand Up @@ -828,14 +829,10 @@ class ScmProxyService @Autowired constructor(private val client: Client) {
}
}
CodeSvnRepository.SVN_TYPE_HTTP -> {
// 凭证中存在token,则直接使用,反之用session接口返回值,此处token是svn的token
// 凭证中存在token,则直接使用,反之用session接口返回值,此处svnToken是svn的token
// 参考:1. com.tencent.devops.process.utils.CredentialUtils.getCredential
// 2. com.tencent.devops.process.service.scm.ScmProxyService.getCredential
if (credential.credentialType == CredentialType.TOKEN_USERNAME_PASSWORD) {
Pair(false, credential.svnToken ?: "")
} else {
Pair(false, credential.privateKey)
}
Pair(false, credential.svnToken ?: "")
}
else -> {
Pair(false, "")
Expand Down

0 comments on commit de10e46

Please sign in to comment.