How to use wildcards in Buddy

How to use wildcards in Buddy

November 29, 2016

Wildcard patterns let you specify which branches will trigger the pipeline execution. This feature is especially useful for testing and deploying multiple branches on development servers.

How to run application tests on push to any branch in the repository

  1. Create a new pipeline
  2. Set the trigger mode to 'On push'
  3. Set the wildcard to *
  4. Add build action for your type of language/framework (eg. PHP)

This way Buddy will automatically test your app on every push, no matter what branch you pushed to.

How to test and deploy all 'dev' branches

  1. Create a new pipeline
  2. Set the trigger mode to 'On Push'
  3. Set the wildcard to dev/*
  4. Add build action for your type of language/framework (eg. Node.js)
  5. Add deployment action for your type of server (eg. SFTP)

This way Buddy will test and deploy your app parameterizing the path according to the deployed branch

Wildcard syntax

In Buddy you can use two kinds of syntax to define wildcard patterns:

SIMPLE

Patterns are created with an asterisk *, for example:

  • *
    • all branches
  • dev*
    • all branches starting with dev

REGEX

The whole pattern must be enclosed in brackets, eg:

  • (.*)
    • all branches
  • (dev.*)
    • all branches starting with dev
  • (^((?!(master)$).)*$)
    • all branches except master branch

Share

About the Author
Alexander Kus

Alexander Kus

Customer Success Manager
A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.

With Buddy even the most complicated CI/CD workflows take minutes to create

Sign up for Buddy CI/CD

Start a free trial

Trusted by customers from 170+ countries