New feature: Tag push support
At the beginning of the year, we made a poll where we asked our customers which feature we should add next.
The winner were on-tag releases & PR support. Today we're delivering the first feature, with the second one following shortly, as the biggest part of the work is already done 😎.
Trigger Release on Tag push
When adding a new pipeline, set the Trigger mode to On every push. Then, choose Tags by wildcard in the second field:
Image loading...
From now on, every time you push a tag to the repo your pipeline will be triggered:
Image loading...
Buddy Params
With the release of this feature we've also added new Buddy Variable for tags:
defaultBUDDY_EXECUTION_TAG
You can use it, for example, in the build action where you prepare a package with your release:
Image loading...
Wildcards
You can use a pattern to define which branches or tags will trigger the pipeline. The patterns support ref names and ref paths. Here are the options possible:
- One for all – enter
*
to run the pipeline for every branch and tag - Only for branches –
refs/HEAD/*
pattern will run the pipeline for every pushed branch - Only for tags –
refs/tags/*
pattern will run the pipeline for every pushed tag - Refs name and refs path – patterns can be based on refs, e.g.
dev*
will run the pipeline for all tags and branches starting withdev
. For more control, you can build a pattern on the ref's path, e.g.refs/tags/v*
will run the pipeline only for tags starting withv
. - Regex wildcard – to use regex , the whole pattern should be enclosed in
()
, e.g.(refs\/tags\/v.+)
will run the pipeline only for tags starting withv
, while(^((?!master$).)*$)
will run the pipeline for all branches except master.
NOTE: The patterns above are also available under 'Help' in the wildcard input Image loading...
YAML
In Buddy you can configure your pipelines either via GUI or buddy.yml
. To define a pipeline that will be triggered on a tag push, you have to use this syntax in the YAML file:
yaml- pipeline: "Production" trigger_mode: "MANUAL" ref_name: "refs/tags/*" ref_type: "WILDCARD" actions: - action: "Execute: echo \"${execution.tag.name}\"" type: "BUILD" working_directory: "/buddy/test-5" docker_image_name: "library/ubuntu" docker_image_tag: "16.04" execute_commands: - "echo \"${execution.tag.name}\"" mount_filesystem_path: "/buddy/test-5" shell: "BASH" trigger_condition: "ALWAYS"
If you want to create a pipeline for a specific tag instead of a wildcard, use this:
yaml- pipeline: "Deploy production" trigger_mode: "ON_EVERY_PUSH" ref_name: "v3.3" ref_type: "TAG" actions: - action: "Execute: echo \"${execution.tag.name}\"" type: "BUILD" working_directory: "/buddy/test-5" docker_image_name: "library/ubuntu" docker_image_tag: "16.04" execute_commands: - "echo \"${execution.tag.name}\"" mount_filesystem_path: "/buddy/test-5" shell: "BASH" trigger_condition: "ALWAYS"
Summary
At the moment, you can trigger Buddy pipelines in a variety of ways:
- on every push to the specific branch
- on every tag push
- on a specific wildcard pattern
- manually on click
- recurrently, at a designated time of the day
If there's any other use case that you can't realize in Buddy, let us know—we'll do our best to help you out!
What's Next
As you know, Buddy is 100% customer driven. With the tags introduced, we can immediately get down to pull request support, with parallelism and 2FA next in line.
Thanks for your support & stay tuned for more info! 🔥
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.