Skip to content

Commit

Permalink
Merge pull request #11119 from royalhuang/issue_10958_app
Browse files Browse the repository at this point in the history
feat:推荐版本号优化 #10958 增加app端兼容
  • Loading branch information
bkci-bot authored Oct 23, 2024
2 parents 0224489 + bbdaebc commit 2106854
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import com.tencent.devops.process.pojo.pipeline.PipelineLatestBuild
import com.tencent.devops.process.service.builds.PipelineBuildFacadeService
import com.tencent.devops.process.service.builds.PipelineBuildMaintainFacadeService
import com.tencent.devops.process.service.builds.PipelinePauseBuildFacadeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired

@Suppress("ALL")
Expand All @@ -76,6 +77,9 @@ class ServiceBuildResourceImpl @Autowired constructor(
private val pipelineRuntimeService: PipelineRuntimeService,
private val containerBuildRecordService: ContainerBuildRecordService
) : ServiceBuildResource {

private val logger = LoggerFactory.getLogger(ServiceBuildResourceImpl::class.java)

override fun getPipelineIdFromBuildId(projectId: String, buildId: String): Result<String> {
if (buildId.isBlank()) {
throw ParamBlankException("Invalid buildId, it must not empty.")
Expand Down Expand Up @@ -764,6 +768,9 @@ class ServiceBuildResourceImpl @Autowired constructor(
): Result<BuildId> {
checkUserId(userId)
checkParam(projectId, pipelineId)
if (buildNo != null) {
logger.info("API|manualStartupNew|$userId|$projectId|$pipelineId|buildNo=$buildNo")
}
return Result(
pipelineBuildFacadeService.buildManualStartup(
userId = userId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ class AppPipelineBuildResourceImpl @Autowired constructor(
pipelineId = pipelineId,
version = version,
channelCode = channelCode
)
).apply {
// TODO app暂时无法同步特性,临时方案为buildNo覆盖为currentBuildNo
buildNo?.currentBuildNo?.let { buildNo?.buildNo = it }
}
)
}

Expand Down

0 comments on commit 2106854

Please sign in to comment.