配置 Event Notifications
Continuous Delivery 将于 2027 年 2 月 12 日在以下地区停止服务:au-syd、ca-tor、us-east。 Code Risk Analyzer 也将于该日期在所有地区停止提供服务。 如果某个区域未实际使用这些功能,该区域内的相关功能可能会提前停用,并停止接受新的实例。 了解更多
您可以使用该 IBM Cloud® Event Notifications 服务接收有关您 IBM Cloud® 账户中发生的重大事件的信息。 您可以将来自 IBM Cloud 服务(如 Toolchains、Monitoring 和 Secrets Manager )的事件通知过滤和路由到通信渠道,如 PagerDuty, Slack、电子邮件、短信、推送通知、webhook、Microsoft® Teams, ServiceNow, 和 IBM Cloud Functions。
在配置工具 Event Notifications 集成之前,请确保已为服务 Event Notifications 实例分配资源。
通过将工具链连接到 Event Notifications 服务实例,Event Notifications 工具集成使工具链及其关联的工具集成实例能够将内置事件和客户机定制事件发送到 Event Notifications 服务支持的任何目标。 有关工具链如何处理事件的更多信息,请参阅 工具链如何收集和发送事件。
请确保所选 Event Notifications 服务实例具有允许工具链向该服务实例发送 事件 的IAM授权策略。 有关通过 Event Notifications 服务实例授予授权的更多信息,请参阅《 为何我被拒绝集成实例 Event Notifications 的权限? 》。
配置 Event Notifications 以从工具链和工具集成实例发送关键事件:
-
若您已拥有工具链并需向其中添加此工具集成,请在控制 IBM Cloud 台中点击菜单图标 (
)> 平台自动化 > 工具链。 在“工具链”页面上,单击某个工具链以打开其“概述”页面。
a. 单击 “添加工具”。
b. 在“工具集成”部分中,单击 Event Notifications。
-
在工具链中的“Event Notifications”卡片上,输入您希望在此工具集成中显示的名称。 此名称用于标识工具链中的工具集成。
-
选择要将工具链连接到的 Event Notifications 实例。
-
点击“创建集成”,将 Event Notifications 工具集成添加到您的工具链中。
-
在工具链的“概述”页面上的 IBM Cloud 工具 卡上,单击 Event Notifications。
有关如何使用 API 或 Terraform 配置 Event Notifications 的更多信息,请参阅 启用通知。
使用 API 配置 Event Notifications
Event Notifications 工具集成支持以下配置参数,您可以在 创建、读取和 更新工具集成时使用工具 链 HTTP API 和 SDK。
必须在请求主体中使用 eventnotifications 值指定 tool_type_id 属性。
| 参数 | 用途 | 类型 | Terraform 自变量 | 描述 |
|---|---|---|---|---|
| 名称 | 必需,可更新 | 字符串 | 名称 | 此工具集成的名称。 |
| 实例-crn | 必需,可更新 | 字符串 | 实例 (instance_crn) | Event Notifications 服务实例的云资源名称 (CRN)。 |
为 Tekton Pipeline 启用通知
您可以配置 Tekton Pipeline 以将事件发送到 Event Notifications 集成。
- 从工具链的“概述”页面中的 交付管道 卡上,单击 Delivery Pipeline 以打开 Tekton Delivery Pipeline 仪表板。
- 在“设置 > 高级设置”页面上,启用 Event Notifications。
- 保存更改。
了解更多关于 Event Notifications
要了解有关 Event Notifications的更多信息,请参阅 Event Notifications 入门。