Skip to content

Commit

Permalink
feat:【流水线插件】支持历史大版本下的小版本更新 TencentBlueKing#1841
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyin0801 committed Aug 16, 2021
1 parent 2e6b347 commit 2365f87
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,30 @@ class RepositoryService @Autowired constructor(
)
}

fun createGitTag(
userId: String,
tagName: String,
ref: String,
repositoryConfig: RepositoryConfig,
tokenType: TokenTypeEnum
): Result<Boolean> {
val repo: CodeGitRepository = serviceGet("", repositoryConfig) as CodeGitRepository
logger.info("the repo is:$repo")
val finalTokenType = generateFinalTokenType(tokenType, repo.projectName)
val getGitTokenResult = getGitToken(finalTokenType, userId)
if (getGitTokenResult.isNotOk()) {
return Result(status = getGitTokenResult.status, message = getGitTokenResult.message ?: "")
}
val token = getGitTokenResult.data!!
return gitService.createGitTag(
repoName = repo.projectName,
tagName = tagName,
ref = ref,
token = token,
tokenType = finalTokenType
)
}

companion object {
private val logger = LoggerFactory.getLogger(RepositoryService::class.java)
}
Expand Down

0 comments on commit 2365f87

Please sign in to comment.