From b3afb677b370efa31058c562f0b5816ea6585ff7 Mon Sep 17 00:00:00 2001 From: kunlongli Date: Thu, 12 Oct 2023 11:04:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9B=E5=BB=BA=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90SVN=20PROXY?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=20#1258?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/bkrepo/repository/config/RepositoryProperties.kt | 1 + .../repository/service/repo/impl/RepositoryServiceImpl.kt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/config/RepositoryProperties.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/config/RepositoryProperties.kt index 1dfee5908b..1b93c13272 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/config/RepositoryProperties.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/config/RepositoryProperties.kt @@ -50,4 +50,5 @@ data class RepositoryProperties( var repoStorageMapping: RepoStorageMapping = RepoStorageMapping(), var allowUserAddSystemMetadata: List = emptyList(), var gitUrl: String = "", + var svnUrl: String = "", ) diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/repo/impl/RepositoryServiceImpl.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/repo/impl/RepositoryServiceImpl.kt index 504807b4cc..b396486b17 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/repo/impl/RepositoryServiceImpl.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/repo/impl/RepositoryServiceImpl.kt @@ -689,6 +689,11 @@ class RepositoryServiceImpl( type == RepositoryType.GIT ) { config.url = "${repositoryProperties.gitUrl}/$projectId/$name.git" + } else if (config is com.tencent.bkrepo.common.artifact.pojo.configuration.proxy.ProxyConfiguration && + type == RepositoryType.SVN && + repositoryProperties.svnUrl.isNotEmpty() + ) { + config.url = "${repositoryProperties.svnUrl}/$projectId/$name" } configuration = config.toJsonString() }