2 additional ways to trigger your builds in Pipelines

By on January 3, 2017

If you didn’t hear it already, Bitbucket recently announced Pipelines which lets your team automate the integration and delivery process. Automation in software development is becoming increasingly important. Automation saves you time because you have less manual work and it reduces risk by giving you a consistent and repeatable process for all of your team’s code. Ultimately, you spend less time putting out fires and more time releasing quality code, faster.

While in most cases, your team will want to use automation to trigger builds when branches are pushed, there are times when you may want to add a manual step to your process, such as with longer-running builds or triggering a release manually.

That’s why we’ve added manual pipelines.

Trigger builds manually

manual-pipeline5

Just add a custom pipeline to your bitbucket-pipelines.yml and you’ll be able to trigger it for a commit in Bitbucket.

Trigger builds with tags

Many of those already using Pipelines have asked for this, and we listened! In addition to letting you set up manual pipelines we’ve also introduced an additional way to trigger your builds — with tags.

You can now trigger your builds with tags in your Git repository (and bookmarks for Mercurial repositories). While your usual development workflow may mean pushing branches, your team might use tags to mark a commit for release. For example, configure a pipeline that deploys on tags then tag your commit to deploy it. Additionally, the name of the tag being built will be available as an environment variable as <$BITBUCKET_TAG>.

image: node:4.6.0
 
pipelines:
  default:
    - step:
        script:
          - npm install
          - npm test
  tag:
    release/*:
      - step:
          script:
            - npm install
            - npm test
            - npm publish ./

Check out our guide on how to trigger builds with tags.

Try Bitbucket Pipelines

If you’re ready to get started with Bitbucket Pipelines, sign up for a Bitbucket cloud account.

If you’re already using Pipelines, you can learn how to set up manual-triggered and tag-triggered builds here. Have feedback for us on these features? Tell us what you think by tweeting us @Bitbucket.

Cheers!

The Bitbucket Pipelines Team