New feature: Trigger condition in actions
Following the update to builds, trigger conditions are now available in all actions. This means you can skip actions if they don't fulfil certain requirements.
The following conditions have been added to the action settings:
- Always execute - the action will run every time the pipeline is executed
- Execute on change in repository - the action will be 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 action will be executed only on a change to specific folder in the repository
Example use case
Let's assume you have a Node.js project with a pipeline that tests your app and deploys it to one of the test servers on push. However, you don't want the deploy to auto-execute if there are changes to the /assets
folder because you need to review them manually.
This can be resolved by adding Wait for approval to the pipeline:
Image loading...Pipeline example
Now, we need to apply the condition to the approval action so it's only triggered if there are changes to the /assets
folder. Go to the action details and click Trigger condition & action name:
Image loading...Action details
Select Execute on change in repository paths and enter the path below:
Image loading...Setting up a trigger condition
Once applied, Buddy will skip this action and automatically run the deploy – unless there are changes to the /assets
folder.
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.