1.6 KiB
1.6 KiB
CI 监控
监听新 projId,自动补全内容,获取从 20240101 到当前的所有流水线信息
监听功能未知原因不好用,先不做了,改手动遍历了
拿到 project_id 后,获取数据表中最新的 pipeline 的 Id,然后比对接口中的 ID 进行填充
如果没有 pipeline 的 id,直接从接口中获取 20240101 到当前的流水线信息
先从数据中获取用户信息填充,随后在根据填充完的用户信息获取全部的 userid 的列表,再写 pipeline 表
图表库
https://g2plot.antv.antgroup.com/examples
数据信息
project 信息
{
id: 'aaa',
project_id: 131366,
description: "场景复现平台-展示设备(移动、音箱、小爱建议、车载、手表等设备)上小爱执行结果及相关处理流程",
name: "ai-scene-review-fe",
path_with_namespace: "miai-fe/fe/ai-scene-review-fe",
web_url: "https://git.n.xiaomi.com/miai-fe/fe/ai-scene-review-fe",
avatar_url: null,
has_new_cicd: false,
}
pipeline 信息
{
id: 'bbb',
project_id: 'aaa',
user_id: 'ccc',
pipeline_id: 7646046,
ref: "preview",
status: "success",
web_url: "https://git.n.xiaomi.com/miai-fe/fe/ai-scene-review-fe/-/pipelines/7646046",
started_at: "2024-03-01T16:47:40.192+08:00",
finished_at: "2024-03-01T16:49:30.624+08:00",
duration: 100,
queued_duration: 6,
}
user 信息
{
id: 'ccc',
user_id: 10011,
username: "zhaoyingbo",
name: "赵英博",
avatar_url: "https://git.n.xiaomi.com/uploads/-/system/user/avatar/10011/avatar.png",
web_url: "https://git.n.xiaomi.com/zhaoyingbo"
}