| retry | max(次数)与 when(失败类型) |
|---|---|
| 类型 | runner_system_failure、stuck_or_timeout_failure 等 |
| timeout | 作业级超时(如 30m) |
| 原则 | 脚本失败不重试,基础设施失败可重试 |
只重试基础设施失败
只重试基础设施失败
test:
script: [make test]
timeout: 30m
retry:
max: 2
when: [runner_system_failure, stuck_or_timeout_failure]重试范围越窄越好:把脚本失败也纳入重试会掩盖真实缺陷。