CircleCI Ideas

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.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Jan 26 2018
  • Taking votes
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    17 May 05:23pm

    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

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    14 Apr 07:24pm

    I really need this feature

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    20 Feb 09:59pm

    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. 

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    12 May, 2019 04:39pm

    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 

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    26 Mar, 2019 10:49am

    This would be very helpful!

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    16 Feb, 2019 12:26pm

    Hi, I published orb for job expiration.

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

     

    Until official support, this may help you.

     

    Thanks.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    7 Dec, 2018 06:40pm

    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.