Automate manual tasks with Bitbucket Pipelines

Software development is an iterative process. Each time you make changes to your code, you have to go through many manual steps like testing, building artifacts, deploying to several environments and more. These tasks can slow you down and take time away from core product development.

That’s where pipelines come in. Using the robust automation features in Bitbucket Pipelines can greatly increase the productivity and velocity of your software project.

If you’re new to Bitbucket Pipelines, here is a quick overview:

  • Integrated CI/CD tool: Bitbucket Pipelines brings industry standard CI/CD and DevOps tools to your software project. Pipelines is integrated into the Bitbucket Cloud UI and is available to you in the nav.
  • No maintenance: Since Bitbucket Pipelines is integrated right into the Bitbucket Cloud UI, it is hosted and maintained by Bitbucket. Unlike third party CI/CD tools, you don’t have to do any maintenance or scaling. This can save your team a lot of time.
  • Improve engineering agility: Measure what matters. Pipelines will give your team visibility and insight into how often deploys are going out or how rapidly features are being completed. Teams can produce metrics like time to delivery from task creation to deployment.
  • Reduce engineering costs: All of the above can lead to lower engineering costs. Implementing pipeline automations helps free up developer resources that would be spent on non customer focused tasks and let them focus on core product development.

Here are a few different ways you can use pipelines.

9 ways to use pipelines in your project

1. Automate your tests

Automated tests are a necessary requirement to achieving continuous integration and furthermore continuous deployment. A suite consists of supplementary code that verifies the primary project code is working as expected. A pipeline can be configured so that any new commits made to a repository are automatically verified against the test suite.

2. Automate generating and storing build artifacts

Software artifacts are the resulting output from build phase of a software project. This output could be binary files, zipped archives, or system level executables. A Bitbucket Pipeline can be configured to automatically generate this output and then move it into a storage system.

3. Automate building container images

Similar to building artifacts mentioned above, containers are a full snapshot of a software and its operating system level dependencies. Containers can be expensive to build and need to be rebuilt when updates are made to the software project. A pipeline can be created to handle all this automatically.

4. Automate publishing and releasing latest builds to package repositories

It is common for software projects to be packaged and distributed to other users to consume. These packages can be delivered to app stores or language package repositories like NPM. A pipeline can be configured to automatically release software packages once new updates have been made.

5. Automate deploying code changes to various environments

It is common practice to have multiple application environments like development, staging, and production. These branches may correspond to individual branches in a git repository. A Bitbucket Pipeline can be created to automatically move new code to these various environments upon commit to the repository.

6. Automatically update Jira issues

Bitbucket Pipelines can tie into Jira Software to provide end-to-end visibility on tasks. A task can be defined in Jira and its status will be updated as developers annotate commits with the task id and push to Bitbucket. Bitbucket Pipelines can then be used to automatically update task status again once an annotated commit has been deployed.

Pipelines integrations: Pipelines supports 3rd party integrations which can be used to add a variety of supportive features to a software project. The next three processes below use third party integrations. There are currently 70+ pipelines integrations.

7. Automatically scan your code for security vulnerabilities

Do you think about security too late in the process? Using the Bitbucket-Snyk integration, you can include security as part of your pipeline. Snyk automatically scans your open source dependencies and containers to find and fix security vulnerabilities in your code.

8. Automatically find bugs in your code

If you happen to find a bug in production, quickly figuring out what line of code caused it is critical. When you include error monitoring in your pipeline with the Bitbucket-Sentry integration, Sentry automatically scans your code before you deploy. Sentry notifies you of runtime errors and/or crashes in your app and quickly helps determine the cause and impact of the error.

9. Automate broadcasting build updates to Slack and other 3rd party systems

Another common integration pipeline is to broadcast messages in a chat application like Slack when a repository is updated or deployed. Use the Bitbucket-Slack integration to keep your team in the loop on code changes.

Start using Pipelines

Here’s a list of Pipelines resources to get started.

Usage: Pipelines usage is based on build minutes. Build minutes are the minutes it takes to execute a pipeline on a runner. The more complex your pipeline, the longer it takes to execute.

Each Bitbucket plan comes with a certain number of build minutes included in the plan. Additional build minutes can be purchased as needed.

Plan type Build minutes per month
Free 50 minutes 
Standard 2500 minutes 
Premium 3500 minutes