NewWe've been named a finalist for โ€œBest CI/CD Toolโ€ and โ€œBest Testing Toolโ€ in the 2023 DevOps Dozen Awardsโ€”click here to vote now

Block step input fields

โ€Œ

Getting data into pipelines can be hard. Instead of wrangling APIs and chatops, you can now add custom forms directly to your Buildkite pipelines ๐Ÿ™Œ๐Ÿป Getting input from your team has never been easier.

Screenshot of the Buildkite Secret Santa block step input fields

Sounds great, but what can I actually use this for?

  • ๐Ÿ–ฅ Choosing an environment before running a deployment script
  • ๐Ÿ’ญ Dynamic questions based on pull request content
  • ๐Ÿ“‘ Automation of team onboarding, offboarding, and other workflows
  • ๐Ÿ’ฅ Checking that you really do want to go through with that Friday afternoon deployment
  • ๐Ÿš€ Adding a name, version, and changelog to a release

We even used it to automate our teamโ€™s Secret Santa ๐Ÿ˜„๐ŸŽ„๐ŸŽ…๐Ÿผ

Adding an input field to your pipeline

  1. Add a block step to your pipeline.yml file.
  2. Provide it with a prompt attribute, and at least one field attribute. For example:
- block: "Question!" prompt: "Please answer this important question" fields: - text: "What day is it today?" key: "day-of-the-week"
  1. Create and run a new build on your updated pipeline!

The data that the user enters into the form is then available on subsequent steps from the build meta-data! ๐Ÿ˜ฑ

Screenshot of the block step input field example

To explore a pipeline with a block step and input fields, take a look at our example repository: https://github.com/buildkite/block-step-example

Check out all of the available input field options over in our documentation. Weโ€™d love to hear what you think! Say hi on twitter, or send us an email.