当前位置: 首页 > news >正文

极狐GitLab 外部流水线验证功能解读

极狐GitLab 是 GitLab 在中国的发行版,关于中文参考文档和资料有:

  • 极狐GitLab 中文文档
  • 极狐GitLab 中文论坛
  • 极狐GitLab 官网

外部流水线验证 (BASIC SELF)

您可以使用外部服务在创建流水线之前进行验证。

极狐GitLab 发送一个 POST 请求到外部服务的 URL,并将流水线数据作为负载。外部服务的响应代码决定了极狐GitLab 是否应该接受或拒绝流水线。如果响应是:

  • 200,流水线被接受。

  • 406,流水线被拒绝。

  • 其他代码,流水线被接受并记录。

如果出现错误或请求超时,流水线将被接受。

由外部验证服务拒绝的流水线不会被创建,也不会出现在极狐GitLab 的 UI 或 API 的流水线列表中。如果您在 UI 中创建的流水线被拒绝,会显示 Pipeline cannot be run. External validation failed。

配置外部流水线验证

要配置外部流水线验证,请添加 EXTERNAL_VALIDATION_SERVICE_URL 环境变量 并将其设置为外部服务的 URL。

默认情况下,请求外部服务将在五秒后超时。要覆盖默认设置,请设置 EXTERNAL_VALIDATION_SERVICE_TIMEOUT 环境变量为所需的秒数。

负载架构

  • tag_list introduced in 极狐GitLab 16.11.
{"type": "object","required" : ["project","user","credit_card","pipeline","builds","total_builds_count","namespace"],"properties" : {"project": {"type": "object","required": ["id","path","created_at","shared_runners_enabled","group_runners_enabled"],"properties": {"id": { "type": "integer" },"path": { "type": "string" },"created_at": { "type": ["string", "null"], "format": "date-time" },"shared_runners_enabled": { "type": "boolean" },"group_runners_enabled": { "type": "boolean" }}},"user": {"type": "object","required": ["id","username","email","created_at"],"properties": {"id": { "type": "integer" },"username": { "type": "string" },"email": { "type": "string" },"created_at": { "type": ["string", "null"], "format": "date-time" },"current_sign_in_ip": { "type": ["string", "null"] },"last_sign_in_ip": { "type": ["string", "null"] },"sign_in_count": { "type": "integer" }}},"credit_card": {"type": "object","required": ["similar_cards_count","similar_holder_names_count"],"properties": {"similar_cards_count": { "type": "integer" },"similar_holder_names_count": { "type": "integer" }}},"pipeline": {"type": "object","required": ["sha","ref","type"],"properties": {"sha": { "type": "string" },"ref": { "type": "string" },"type": { "type": "string" }}},"builds": {"type": "array","items": {"type": "object","required": ["name","stage","image","tag_list","services","script"],"properties": {"name": { "type": "string" },"stage": { "type": "string" },"image": { "type": ["string", "null"] },"tag_list": { "type": ["array", "null"] },"services": {"type": ["array", "null"],"items": { "type": "string" }},"script": {"type": "array","items": { "type": "string" }}}}},"total_builds_count": { "type": "integer" },"namespace": {"type": "object","required": ["plan","trial"],"properties": {"plan": { "type": "string" },"trial": { "type": "boolean" }}},"provisioning_group": {"type": "object","required": ["plan","trial"],"properties": {"plan": { "type": "string" },"trial": { "type": "boolean" }}}}
}

namespace 字段仅在 极狐GitLab 专业版和旗舰版 中可用。

相关文章:

  • SpringAI+DeepSeek大模型应用开发——4 对话机器人
  • 多模态大模型的算力需求预测:从理论FLOPs到实际集群配置(搭建算力成本评估模型的方法论)
  • Linux,redis群集模式,主从复制,读写分离
  • 山东大学软件学院创新项目实训开发日志(15)之中医知识问答历史对话查看bug处理后端信息响应成功但前端未获取到
  • 在Pycharm配置stable diffusion环境(使用conda虚拟环境)
  • Python(19)Python并发编程:深入解析多线程与多进程的差异及锁机制实战
  • 1. 列表解决数列问题1
  • halcon模板匹配(七)adapt_shape_model_high_noise
  • 数据库-day06
  • FPGA阵列
  • AI写程序:用 AI 实现一个递归批量转化 GBK/GB2312 转 UTF-8 工具:轻松解决文本编码转换难题
  • Vue与React组件化设计对比
  • Rust + WebAssembly 生产部署指南
  • apollo 动态配置
  • Kubernetes》》K8S》》Pod的健康检查
  • 绿幕抠图直播软件-蓝松抠图插件--使用相机直播,灯光需要怎么打?
  • 多路由器通过三层交换机互相通讯(单臂路由+静态路由+默认路由版),通过三层交换机让pc端相互通讯
  • 如何分析服务器日志以追踪黑客攻击行为
  • 阿里云RAM账号免密登录Java最佳实践
  • DP 32bit位宽数据扰码实现和仿真
  • 微软将裁员3%,减少管理层
  • 安徽省委常委、合肥市委书记费高云卸任副省长职务
  • 市场监管总局等五部门约谈外卖平台企业
  • 通化市委书记孙简升任吉林省副省长
  • 俄乌拟在土耳其举行会谈,特朗普:我可能飞过去
  • 北美票房|昔日偶像风光不再,乔什·哈内特新片开画不佳