Create your FREE Codefresh account and start making pipelines fast. Create Account

Pause your pipelines and resume after manual approval

2 min read

One of the most important differences between Continuous Deployment and Continuous Delivery is the level of human involvement in a pipeline. The typical Continuous Delivery pipeline requires a person to approve deployment to production, where Continuous Deployment pipelines are fully automated (every feature that passes tests and checks is deployed right way).

After several customer requests, Codefresh has implemented the final piece of this puzzle and allows you to pause a pipeline before moving on.

Approval to production
Approval to production

This is accomplished using the approval pipeline step which is very easy to use in pipelines just by inserting 3 extra lines:

The approval step also has the capability to be queried for its result. You can easily use it for other tasks such as waiting for any “destructive actions”. Here is a pipeline that will only destroy a test environment if the approval step is actually enabled:

Approval result
Approval result

If the user rejects the step, the test environment is never destroyed. This is accomplished by using the standard step dependencies in Codefresh.

The destruction step in this pipeline is checking the approval status before actually continuing. Otherwise, it is skipped.

A more advanced use case is to use a single approval step in order to take a binary decision within a pipeline. So instead of using it as a gateway to production, you can actually choose for the deployment target.

Here is a pipeline that deploys in production or staging depending on the approval step:

Choose environment
Choose environment

This is the Codefresh yaml:

Here is the output for production deployment (the staging steps are skipped):

Pipeline approved
Pipeline approved

And here is the output for staging deployment (the production steps are skipped):

Pipeline Rejected
Pipeline Rejected

Finally, notice also that the approval step can be used from a Slack channel as well 🙂

Slack approval
Slack approval

The approval step is available to all Codefresh plans. Notice that during the approval phase no pipeline resources are consumed. See the documentation for more details.

New to Codefresh? Create Your Free Account Today!

Kostis Kapelonis

About Kostis Kapelonis

Kostis is a software engineer/technical-writer dual class character. He lives and breathes automation, good testing practices and stress-free deployments.

Enjoy this article? Don't forget to share.

Comments

* All fields are required. Your email address will not be published.

Related Posts

Get a head start on building better pipelines!

Schedule a demo with a Codefresh expert today.