---
name: "Deploy Confirmation Block Step"
description: "Uses a block step to confirm deployments on Fridays."
author: "buildkite"
repo: "deploy-confirm-block-step-example"
stars: 5
demo: "https://buildkite.com/buildkite/deploy-confirm-block-step-example/builds/latest?branch=main"
---

# Buildkite Deploy Confirmation Block Step Example


This repository is an example [Buildkite](https://buildkite.com/) pipeline that shows how to use a [`block` step](https://buildkite.com/docs/pipelines/block-step) to confirm deployments - but only if the `date` command on the agent returns **Friday**.



See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running.


<a href="https://buildkite.com/buildkite/deploy-confirm-block-step-example/builds/latest?branch=main">
  <img width="2400" alt="Screenshot of deploy confirmation block example pipeline" src="https://raw.githubusercontent.com/buildkite/deploy-confirm-block-step-example/main/.buildkite/screenshot.png" />
</a>

<!-- docs:start -->

## How it works

If the current day is **Friday**, a block step will appear asking for manual deploy confirmation. The user can choose to:

- ✅ **Confirm deploy**
  Respond: `"Yes, I'm sure. If something goes wrong, I'll fix it"`
  → `deploy.sh` runs normally

- ❌ **Cancel deploy**
  Respond: `"Err, nah. I've changed my mind"`
  → `deploy.sh` still runs but exits with a failure

### Block step preview

Here's what the block step looks like:

![Block step demo](https://raw.githubusercontent.com/buildkite/deploy-confirm-block-step-example/main/images/demo.gif)

#### ✅ Confirming

<img src="https://raw.githubusercontent.com/buildkite/deploy-confirm-block-step-example/main/images/yes.png" width="600" alt="Yes confirmation example" />

#### ❌ Cancelling

<img src="https://raw.githubusercontent.com/buildkite/deploy-confirm-block-step-example/main/images/no.png" width="600" alt="No confirmation example" />

<!-- docs:end -->

## License

See [LICENSE.md](https://github.com/buildkite/deploy-confirm-block-step-example/blob/HEAD/LICENSE.md) (MIT)