CI/CD Can I get timeout set in the repo?

Hi, I have init a repo on gitlab and set its timeout config on Project settings → CI/CD Pipelines → Timeout, I wonder can I get the value of timeout in the .gitlab-ci.yml of this repo, e.g. I want to echo the timeout that I set in this project. Thanks.

Hi @huanghy6268

there is no predefined or built-in variable you can use. You need to query Project GitLab API to get the configured value of build_timeout.

The value from API is in seconds and 600 seconds equals 10 minutes. The UI just shows it more human friendly.

Thanks, this help me a lot.