Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:保存流水线时,校验是否有子流水线循环依赖 #10479 #10794

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
bd5d9d1
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
9ad1e5e
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
53e4a2e
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
f642029
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
a4ca95d
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
5f98656
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 12, 2024
ad8aa74
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 15, 2024
3969312
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 15, 2024
44451c3
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 16, 2024
7e20ff7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 17, 2024
e66c943
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 17, 2024
616caab
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 17, 2024
6ae79c7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 17, 2024
f102b72
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 18, 2024
e59dac7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 19, 2024
0ee2145
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 19, 2024
b7844a6
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Jul 24, 2024
33cafbc
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Aug 6, 2024
b4612b0
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Aug 7, 2024
1cabeb4
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Aug 12, 2024
e9c99cf
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Aug 12, 2024
30d718a
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe Sep 5, 2024
9b7d3ca
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Sep 5, 2024
be06e0a
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Sep 5, 2024
cafc101
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Sep 5, 2024
cc9f995
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
mingshewhe Oct 14, 2024
8315c6d
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe Oct 16, 2024
fa4d8d8
Merge branch 'feat_10479' of https://github.com/hejieehe/bk-ci into f…
hejieehe Oct 16, 2024
da1581b
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 17, 2024
4df2607
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
86b9d52
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
2416898
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
bc96d81
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
ade1383
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
0a9e559
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
8354d43
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 21, 2024
d55aaa7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 22, 2024
1f28bf5
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 22, 2024
8d7a7c7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 22, 2024
f63ff6b
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Oct 22, 2024
5a587ff
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe Nov 22, 2024
6b8f9d7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
021a537
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
8f29fdb
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
79746da
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
46937a7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
822c5d7
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
f848f95
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
ee81d4d
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
4fce7e1
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 25, 2024
63e4787
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 26, 2024
b183d7c
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 26, 2024
8ea72b9
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 26, 2024
a346e67
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 26, 2024
2123e83
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Nov 27, 2024
448358b
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 4, 2024
7038d2a
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe Dec 4, 2024
aea0f80
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 4, 2024
a860bfc
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 4, 2024
a5bb6fd
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 4, 2024
cff180c
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 4, 2024
8433873
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 6, 2024
823232d
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 9, 2024
d3a0d14
Merge branch 'master' of https://github.com/TencentBlueKing/bk-ci int…
hejieehe Dec 9, 2024
8b41552
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 9, 2024
03a9306
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 10, 2024
4a063ea
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
hejieehe Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ interface ModelCheckPlugin {
userId: String,
isTemplate: Boolean = false,
oauthUser: String? = null,
pipelineDialect: IPipelineDialect? = null
pipelineDialect: IPipelineDialect? = null,
pipelineId: String = ""
): Int

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ data class SubPipelineCallElement(
) : Element(name, id, status) {
companion object {
const val classType = "subPipelineCall"
const val TASK_ATOM = "subPipelineCallAtom"
}
override fun getTaskAtom() = "subPipelineCallAtom"
override fun getTaskAtom() = TASK_ATOM
override fun getClassType() = classType
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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.common.pipeline.pojo.element.atom

/**
* 插件检查参数
*/
data class ElementBatchCheckParam(
val projectId: String?,
val pipelineId: String,
val userId: String,
val contextMap: Map<String, String>,
val isTemplate: Boolean,
val oauthUser: String?
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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.common.pipeline.pojo.element.atom

import com.tencent.devops.common.pipeline.container.Container
import com.tencent.devops.common.pipeline.container.Stage
import com.tencent.devops.common.pipeline.pojo.element.Element

/**
* 插件引用信息
*/
data class ElementHolder(
val element: Element,
val stage: Stage,
val container: Container
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
* 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.store.common.utils
package com.tencent.devops.common.util

import com.tencent.devops.store.atom.service.impl.OpAtomServiceImpl
import java.util.concurrent.Executors
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
Expand Down Expand Up @@ -72,5 +71,5 @@ object ThreadPoolUtil {
logger.info("$actionTitle time cost: ${System.currentTimeMillis() - startTime}")
}

private val logger = LoggerFactory.getLogger(OpAtomServiceImpl::class.java)
private val logger = LoggerFactory.getLogger(ThreadPoolUtil::class.java)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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.api.op

import com.tencent.devops.common.api.auth.AUTH_HEADER_USER_ID
import com.tencent.devops.common.api.auth.AUTH_HEADER_USER_ID_DEFAULT_VALUE
import com.tencent.devops.common.api.pojo.Result
import io.swagger.v3.oas.annotations.tags.Tag
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.Parameter
import javax.ws.rs.Consumes
import javax.ws.rs.HeaderParam
import javax.ws.rs.POST
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.QueryParam
import javax.ws.rs.core.MediaType

@Tag(name = "OP_PIPELINE_AGENT_REF", description = "OP-流水线-更新子流水线引用信息")
@Path("/op/subpipeline/ref")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
interface OpSubPipelineRefResource {

@Operation(summary = "更新子流水线引用信息")
@POST
@Path("/create")
fun createSubPipelineRef(
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
@HeaderParam(AUTH_HEADER_USER_ID)
userId: String,
@Parameter(description = "项目ID", required = false)
@QueryParam("projectId")
projectId: String?,
@Parameter(description = "流水线id", required = false)
@QueryParam("pipelineId")
pipelineId: String?
): Result<Boolean>
}
Original file line number Diff line number Diff line change
Expand Up @@ -558,4 +558,18 @@ object ProcessMessageCode {
// 用户[xxx] 没有如下子流水线的执行权限,重置授权失败
const val BK_NOT_SUB_PIPELINE_EXECUTE_PERMISSION_RESET_ERROR_TITLE =
"bkNotSubPipelineExecutePermissionResetErrorTitle"
// 子流水线循环依赖错误标题
const val BK_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_TITLE = "bkSubPipelineCircularDependencyErrorTitle"

// 当前流水线存在循环依赖
const val BK_CURRENT_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_MESSAGE =
"bkCurrentSubPipelineCircularDependencyErrorMessage"

// 子流水线[xxx]调用了当前流水线,形成循环依赖
const val BK_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_MESSAGE =
"bkSubPipelineCircularDependencyErrorMessage"

// [xxx]流水线循环调用[xxx]流水线,形成循环依赖
const val BK_OTHER_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_MESSAGE =
"bkOtherSubPipelineCircularDependencyErrorMessage"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ data class PipelineModelTask(
val taskAtom: String,
val taskParams: MutableMap<String, Any>,
val additionalOptions: ElementAdditionalOptions?,
val os: String? = "linux"
val os: String? = "linux",
val taskPosition: String = "", // 插件在model中的位置,eg: stageSeq-jobSeq-taskSeq
val stageEnable: Boolean = true,
val containerEnable: Boolean = true
) {
fun getTaskParam(paramName: String): String {
return if (taskParams[paramName] != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.pojo.pipeline

/**
* 子流水线ID和名称
*/
data class SubPipelineIdAndName(
val projectId: String,
val pipelineId: String,
val pipelineName: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* 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.pojo.pipeline

import com.tencent.devops.common.pipeline.pojo.element.Element
import com.tencent.devops.common.pipeline.pojo.element.EmptyElement
import com.tencent.devops.common.pipeline.pojo.element.atom.SubPipelineType
import io.swagger.v3.oas.annotations.media.Schema

@Schema(title = "子流水线依赖信息")
data class SubPipelineRef(
@get:Schema(title = "流水线Id", required = true)
val pipelineId: String,
@get:Schema(title = "流水线名称", required = true)
val pipelineName: String,
@get:Schema(title = "流水线项目Id", required = true)
val projectId: String,
@get:Schema(title = "流水线项目渠道", required = true)
val channel: String,
@get:Schema(title = "插件", required = true)
val element: Element,
@get:Schema(title = "插件所在位置[stageIndex-containerIndex-taskIndex]", required = true)
val taskPosition: String,
@get:Schema(title = "子流水线流水线Id", required = true)
val subPipelineId: String,
@get:Schema(title = "子流水线项目Id", required = true)
val subProjectId: String,
@get:Schema(title = "子流水线名称", required = true)
val subPipelineName: String,
@get:Schema(title = "校验权限用户", required = true)
val userId: String = "",
@get:Schema(title = "插件启用状态", required = true)
val elementEnable: Boolean = true,
@get:Schema(title = "是否为模板流水线", required = true)
val isTemplate: Boolean = false,
@get:Schema(title = "插件参数[projectId]", required = false)
val taskProjectId: String = "",
@get:Schema(title = "插件参数[type]", required = false)
val taskPipelineType: SubPipelineType = SubPipelineType.ID,
@get:Schema(title = "插件参数[pipelineId]", required = false)
val taskPipelineId: String? = "",
@get:Schema(title = "插件参数[pipelineName]", required = false)
val taskPipelineName: String? = ""
) {
constructor(projectId: String, pipelineId: String, subPipelineId: String, subProjectId: String) : this(
pipelineId = pipelineId,
pipelineName = "",
projectId = projectId,
channel = "",
element = EmptyElement(),
subPipelineId = subPipelineId,
subProjectId = subProjectId,
subPipelineName = "",
userId = "",
elementEnable = true,
isTemplate = false,
taskPosition = ""
)

// 递归检查使用
fun refKey() = "$projectId|$pipelineId"

fun subRefKey() = "$subProjectId|$subPipelineId"

// 链路打印
fun chainKey() = "$projectId|$pipelineId|$taskPosition"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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.pojo.pipeline

import com.tencent.devops.common.pipeline.pojo.element.atom.SubPipelineType
import io.swagger.v3.oas.annotations.media.Schema

@Schema(title = "子流水线插件参数")
data class SubPipelineTaskParam(
@get:Schema(title = "源参数值[projectId]", required = false)
val taskProjectId: String = "",
@get:Schema(title = "源参数值[type]", required = false)
val taskPipelineType: SubPipelineType = SubPipelineType.ID,
@get:Schema(title = "源参数值[pipelineId]", required = false)
val taskPipelineId: String? = null,
@get:Schema(title = "源参数值[pipelineName]", required = false)
val taskPipelineName: String? = null,
@get:Schema(title = "解析后[projectId]", required = false)
val projectId: String = "",
@get:Schema(title = "解析后[pipelineId]", required = false)
val pipelineId: String = "",
@get:Schema(title = "解析后[pipelineName]", required = false)
val pipelineName: String = ""
)
Loading
Loading