Skip to content

Commit

Permalink
feat:新建/编辑流水线时支持调试流水线 TencentBlueKing#8164 修复构建历史区分源材料分支和触发分支搜索
Browse files Browse the repository at this point in the history
1. 构建历史支持源材料和触发材料搜索
2. 触发分支和源材料分支支持下来搜索
  • Loading branch information
mingshewhe committed Aug 1, 2024
1 parent e986b17 commit 638e040
Show file tree
Hide file tree
Showing 10 changed files with 562 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ interface AppPipelineBuildResource {
buildMsg: String?,
@Parameter(description = "查看指定版本调试数据", required = false, example = "false")
@QueryParam("version")
customVersion: Int? = null
customVersion: Int? = null,
@Parameter(description = "触发代码库", required = false)
@QueryParam("triggerAlias")
triggerAlias: List<String>?,
@Parameter(description = "触发分支", required = false)
@QueryParam("triggerBranch")
triggerBranch: List<String>?
): Result<BuildHistoryPage<BuildHistory>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,13 @@ interface ServiceBuildResource {
archiveFlag: Boolean? = false,
@Parameter(description = "查看指定版本调试数据", required = false, example = "false")
@QueryParam("version")
customVersion: Int? = null
customVersion: Int? = null,
@Parameter(description = "触发代码库", required = false)
@QueryParam("triggerAlias")
triggerAlias: List<String>?,
@Parameter(description = "触发分支", required = false)
@QueryParam("triggerBranch")
triggerBranch: List<String>?
): Result<BuildHistoryPage<BuildHistory>>

@Operation(summary = "获取构建详情")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.tencent.devops.common.pipeline.pojo.BuildParameters
import com.tencent.devops.common.pipeline.pojo.StageReviewRequest
import com.tencent.devops.common.pipeline.pojo.element.Element
import com.tencent.devops.common.web.annotation.BkField
import com.tencent.devops.process.enums.HistorySearchType
import com.tencent.devops.process.pojo.BuildHistory
import com.tencent.devops.process.pojo.BuildHistoryRemark
import com.tencent.devops.process.pojo.BuildId
Expand Down Expand Up @@ -400,13 +401,13 @@ interface UserBuildResource {
@Parameter(description = "每页多少条", required = false, example = "20")
@QueryParam("pageSize")
pageSize: Int?,
@Parameter(description = "代码库别名", required = false)
@Parameter(description = "源材料代码库别名", required = false)
@QueryParam("materialAlias")
materialAlias: List<String>?,
@Parameter(description = "代码库URL", required = false)
@QueryParam("materialUrl")
materialUrl: String?,
@Parameter(description = "分支", required = false)
@Parameter(description = "源材料分支", required = false)
@QueryParam("materialBranch")
materialBranch: List<String>?,
@Parameter(description = "commitId", required = false)
Expand Down Expand Up @@ -462,7 +463,13 @@ interface UserBuildResource {
archiveFlag: Boolean? = false,
@Parameter(description = "查看指定版本调试数据", required = false, example = "false")
@QueryParam("version")
customVersion: Int? = null
customVersion: Int? = null,
@Parameter(description = "触发代码库", required = false)
@QueryParam("triggerAlias")
triggerAlias: List<String>?,
@Parameter(description = "触发分支", required = false)
@QueryParam("triggerBranch")
triggerBranch: List<String>?
): Result<BuildHistoryPage<BuildHistory>>

@Operation(summary = "修改流水线备注")
Expand Down Expand Up @@ -534,7 +541,13 @@ interface UserBuildResource {
pipelineId: String,
@Parameter(description = "查看指定版本调试数据", required = false, example = "false")
@QueryParam("version")
debugVersion: Int? = null
debugVersion: Int? = null,
@Parameter(description = "搜索分支关键字", required = false)
@QueryParam("search")
search: String?,
@Parameter(description = "搜索类型, 触发/源材料", required = false)
@QueryParam("type")
type: HistorySearchType? = HistorySearchType.MATERIAL
): Result<List<String>>

@Operation(summary = "获取流水线构建中的查询条件-分支")
Expand All @@ -556,7 +569,13 @@ interface UserBuildResource {
alias: List<String>?,
@Parameter(description = "查看指定版本调试数据", required = false, example = "false")
@QueryParam("debugVersion")
debugVersion: Int? = null
debugVersion: Int? = null,
@Parameter(description = "搜索分支关键字", required = false)
@QueryParam("search")
search: String?,
@Parameter(description = "搜索类型,触发/源材料", required = false)
@QueryParam("type")
type: HistorySearchType? = HistorySearchType.MATERIAL
): Result<List<String>>

@Operation(summary = "触发审核")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
*
* A copy of the MIT License is included in this file.
*
*
* Terms of the MIT License:
* ---------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package com.tencent.devops.process.enums

/**
* 构建历史搜索类型
*/
enum class HistorySearchType {
// 触发器
TRIGGER,

// 源材料
MATERIAL
}
Loading

0 comments on commit 638e040

Please sign in to comment.