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:

From now on, every time you push a tag to the repo your pipeline will be triggered:

Buddy Params

With the release of this feature we’ve also added new Buddy parameters for tags:

${execution.tag.url}
${execution.tag.html_url}
${execution.tag.name}

You can use them, for example, in the build action where you prepare a package with your release:

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:

  1. One for all – enter * to run the pipeline for every branch and tag
  2. Only for branches – refs/HEAD/* pattern will run the pipeline for every pushed branch
  3. Only for tags – refs/tags/* pattern will run the pipeline for every pushed tag
  4. Refs name and refs path – patterns can be based on refs, e.g. dev* will run the pipeline for all tags and branches starting with dev. 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 with v.
  5. 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 with v, while (^((?!master$).)*$) will run the pipeline for all branches except master.

NOTE: The patterns above are also available under ‘Help’ in the wildcard input

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:

- 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:

- 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! 🔥