GitLab CI管道阶段超时 [英] GitLab CI Pipeline Stage Timeout

查看:711
本文介绍了GitLab CI管道阶段超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自托管的GitLab CI server(社区版本v8.9.5)和gitlab-ci-multi-runner 1.2.0来构建项目.我的流水线阶段之一(测试)需要一段时间才能运行,并且我得到以下erm:

I'm using a self-hosted GitLab CI server (community edition v8.9.5) and gitlab-ci-multi-runner 1.2.0 to build a project. One of my pipeline stages (test) takes a while to run and I get the following erm:

ERROR: Build failed: execution took longer than 3600 seconds

该超时的替代位置在哪里?我可以将其仅用于测试管道阶段吗?

Where do I put the override for this timeout? Can I apply it to just the test pipeline stage?

推荐答案

您可以在"项目设置->中设置全局超时. CI/CD管道->超时" "项目设置->构建-> .

从版本12.3开始,您可以使用

As of version 12.3, you can set a timeout per stage in your CI .yml file using timeout:

timeout允许您为特定作业配置超时.例如:

timeout allows you to configure a timeout for a specific job. For example:

build:
  script: build.sh
  timeout: 3 hours 30 minutes

test:
  script: rspec
  timeout: 3h 30m

作业级超时可以超过项目级超时,但不能超过Runner特定的超时.

The job-level timeout can exceed the project-level timeout but can’t exceed the Runner-specific timeout.

这篇关于GitLab CI管道阶段超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆