Expiry token for type: approval jobs

Example:

 - approve_release:
          type: approval
          requires:
            - checkout_and_build
          filters:
            branches:
              only: /master/
          expiry: 24h

 

Reasoning:

Jobs with type: approval require manual confirm/cancel, and as such are a good control method for jobs that don't need to be run every build, or builds that require review before completion (e.g. releases).

One use we have for these job types is to build docker images from successful builds on the fly. We don't need docker images for every build, and there are many builds in a day, so the approval jobs pile up.

We don't need any builds older than 24hrs, so a suggestion to prevent a build up of on hold jobs (not sure what impact this has on a CircleCI cloud/personal server) is to introduce an expiry token as part of the workflow description.

  • Jessica Mowatt
  • Jan 26 2018
  • Taking votes
  • Attach files
  • Mark Hansen commented
    17 May 17:23

    We do our static website builds which are 100,000+ pages w/ approved builds and I'm always afraid that our content editor is going to approve an old build. We're a very small team so non-technical teammates have to be somewhat using the technical tools. It makes me nervous they're going to deploy an old version, so I'd love to expire/cancel after a few hours

  • Benjamin Lizarraga commented
    14 Apr 19:24

    I really need this feature

  • Lisandro Dee commented
    20 Feb 21:59

    This orb https://circleci.com/orbs/registry/orb/azihsoyn/job-expiration does not help in the case of the authors ideas which i believe to be a good one. The approval remains on hold until its approved or workflow is cancelled. It only expires the next upcoming job and marks it as Failed instead of cancelled if the expiration check determines that the set time has expired. 

  • Stepan Vrany commented
    May 12, 2019 16:39

    This is really needed. You really don't want to have dozens of suspended/waiting workflows in your dashboard. I can imagine possible aftermath. It hurts :D 

  • Yarden Sachs commented
    March 26, 2019 10:49

    This would be very helpful!

  • Naoya Yoshizawa commented
    February 16, 2019 12:26

    Hi, I published orb for job expiration.

    https://circleci.com/orbs/registry/orb/azihsoyn/job-expiration

     

    Until official support, this may help you.

     

    Thanks.

  • Eric Dahlseng commented
    December 07, 2018 18:40

    This has benefits beyond limiting the build up of jobs --> we use approvals to block deployments to production, but sometimes multiple builds will pile up. If someone were to accidentally click an approval on an older build, then that would deploy over our current production environment. Expirations on approvals would help prevent this behavior from occurring.