From 75d234c8e55224ed36ccec26ff3ffc25dee96d0d Mon Sep 17 00:00:00 2001 From: jamikxu Date: Fri, 11 Feb 2022 17:20:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118=20=20add=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/quality/service/v2/QualityHistoryService.kt | 1 + .../com/tencent/devops/quality/util/QualityUrlUtils.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index 92d1beef80d..c6eb8c03b4a 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -268,6 +268,7 @@ class QualityHistoryService @Autowired constructor( detail = record.detail, client = client ) + logger.info("QUALITY|logPromt is: ${record.logPrompt}") } } QualityRuleIntercept( diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt index b8907894b98..c3e75a37462 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt @@ -32,6 +32,7 @@ import com.tencent.devops.plugin.codecc.CodeccUtils import com.tencent.devops.process.api.service.ServiceVarResource import com.tencent.devops.quality.constant.DEFAULT_CODECC_URL import com.tencent.devops.quality.constant.codeccToolUrlPathMap +import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Value import org.springframework.stereotype.Component @@ -41,6 +42,8 @@ class QualityUrlUtils { @Value("\${quality.codecc.host:}") private val codeccHost: String = "" + private val logger = LoggerFactory.getLogger(QualityUrlUtils::class.java) + fun getCodeCCUrl( projectId: String, pipelineId: String, @@ -58,6 +61,7 @@ class QualityUrlUtils { return if (detail.isNullOrBlank() || detail!!.split(",").size > 1) { "http://$codeccHost/codecc/$projectId/task/$taskId/detail?buildId=$buildId" } else { + logger.info("QUALITY|codeccUrl: $projectId, $taskId, $buildId") val detailValue = codeccToolUrlPathMap[detail] ?: DEFAULT_CODECC_URL val fillDetailUrl = detailValue.replace("##projectId##", projectId) .replace("##taskId##", taskId.toString()) @@ -65,6 +69,5 @@ class QualityUrlUtils { .replace("##detail##", detail) "http://$codeccHost$fillDetailUrl" } - return "" } }