New feature: Trigger condition in builds

June 30, 2017

New feature: Trigger condition in builds

Buddy lets you run delivery pipelines in various modes: manually on click, recurrently on interval, or automatically on push to repository. However, sometimes you may want to run a pipeline but skip certain actions—for example, when the commited changes don't require to be compiled by the build.

This is why we've added the Trigger condition to build actions. From now on, you can select one of the following options:

  • Always execute - the action will run every time the pipeline is executed
  • Execute on change in repository - the build will run only if Buddy detects a commit has been pushed to the pipeline's branch. This is useful, for example, if you want to re-deploy the application in the same revision to the server and don't need to compile it again
  • Execute on change in repository paths - the build will run only on a change to specific folder in the repository

Example use case

Let's imagine you have a repository with Gulp tasks (eg. compile Sass) with a pipeline attached that runs gulp and deploys the files to SFTP:

Pipeline examplePipeline example

The thing is you don't need to run gulp tasks every time if there were no changes to the Sass files. Let's add a trigger mode that will activate the action only if changes to assets have been detected:

  1. Go to the build action click More options at the bottom:

    Action detailsAction details

  2. Select Execute on change in repository paths and enter the path below:

    Environment configurationEnvironment configuration

From now on, Buddy will skip the action and label it as 'Completed' if no changes to the selected folder were applied. The rest of actions will be executed as normally:

Running a pipelineRunning a pipeline

TIP: You can learn more about optimizing your deployment practices in this guide.


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.