Is there an option to add a timeout to job approval?

I have a workflow with an approval job:

    version: 2
            - build
            - wait_approval_deploy:
                 type: approval
                     - build
            - deploy:
                    - build
                    - wait_approval_deploy

How can I set a timeout to this job that after X seconds the hold will be expired?
After this timeout, the workflow will not wait for approval anymore and the workflow will be canceled.


Hi @eyalmeiron,

Thank you for sharing your question on our forum!

Currently there is no way to set a timeout for approval jobs. There is a limit of 90 days for jobs to be approved, and in the case that workspaces are used the limit is 15 days.

One workaround would be to utilize our api to occasionally check the duration of approval jobs, and then cancel them if they exceeded a specific time. This would require you to create a custom script however.

You can find more information about our API endpoints on the following page:

CircleCI API

You are also more than welcome to create a feature request for this here as well:

Cloud Feature Requests | CircleCI Ideas

Best Regards

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.