Skip to content

Commit

Permalink
第三方构建机DockerUi界面支持 TencentBlueKing#10962
Browse files Browse the repository at this point in the history
  • Loading branch information
tangruotian committed Sep 18, 2024
1 parent c213537 commit 6ab6574
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,23 @@ enum class PoolType {

private fun makeContainer(dockerInfo: ThirdPartyAgentDockerInfo?): Container3? {
if (dockerInfo == null) return null
// 使用研发商店镜像的情况
if (dockerInfo.storeImage != null) {
return Container3(
imageVersion = dockerInfo.storeImage?.imageVersion,
imageCode = dockerInfo.storeImage?.imageCode,
credentials = with(dockerInfo.credential) {
when {
this == null -> null
credentialId != null -> dockerInfo.credential?.credentialId?.ifBlank { null }
user != null && password != null -> Credentials(user!!, password!!)
else -> null
}
},
options = dockerInfo.options,
imagePullPolicy = dockerInfo.imagePullPolicy
)
}
return Container3(
image = dockerInfo.image,
credentials = with(dockerInfo.credential) {
Expand Down

0 comments on commit 6ab6574

Please sign in to comment.