Skip to content

Commit

Permalink
feat: 流水线级回调与流水线编排解耦 #11283
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Jan 15, 2025
1 parent 75326fc commit b71cac8
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1379,20 +1379,24 @@ class PipelineRepositoryService constructor(
}
}
}
// 填充流水线级别回调
resource?.model?.events = pipelineCallbackDao.list(
pipelineCallbackDao.list(
dslContext = dslContext,
projectId = projectId,
pipelineId = pipelineId,
event = null
).associate {
it.name to PipelineCallbackEvent(
callbackEvent = CallBackEvent.valueOf(it.eventType),
callbackUrl = it.url,
secretToken = it.secretToken?.let { AESUtil.decrypt(aesKey, it) },
region = CallBackNetWorkRegionType.valueOf(it.region),
callbackName = it.name
)
).let { records ->
if (records.isNotEmpty) {
// 填充流水线级别回调
resource?.model?.events = records.associate {
it.name to PipelineCallbackEvent(
callbackEvent = CallBackEvent.valueOf(it.eventType),
callbackUrl = it.url,
secretToken = it.secretToken?.let { AESUtil.decrypt(aesKey, it) },
region = CallBackNetWorkRegionType.valueOf(it.region),
callbackName = it.name
)
}
}
}
return resource
}
Expand Down

0 comments on commit b71cac8

Please sign in to comment.