Better release management with JFrog and Bitbucket Pipelines

This article was written with Jainish Shah from JFrog, a company that build tools that handle artifact management and distribution, including Artifactory and Bintray. This blog is one of a series written by companies who attended our recent Bitbucket Cloud Dev Week.

My time at Atlassian's Bitbucket Cloud Dev Week proved to be very fulfilling, and not just for the cool code we produced.

I'm excited about that too, of course. Using Bitbucket Cloud's V2 APIs, I was able to create a new JFrog Artifactory integration plugin that provides a release management dashboard for Bitbucket Cloud. It shows information that Artifactory, Xray, and Bintray maintains about artifacts created during a release cycle that works with both Bitbucket Pipelines and Bamboo, and I'm delighted to be able to share it as an open source project.

Just as important, I gained an appreciation of why it was such an impactful project to complete. It was awesome to see onsite the many ways Atlassian's developers continue to improve their software, and how Bitbucket Pipelines is empowering developers to build and ship code using Bitbucket Pipelines on every commit.

Witnessing Atlassian's hosting servers perform was amazing, operating a production environment at a breathtakingly high scale. Within their facility, thousands of customers across the globe commit code every minute, launching thousands of containers for orchestration at a frequency that made my brain swim.

It feels good to be a part of it, and to see how Artifactory, Xray, and Bintray can continue to serve so many.

Using JFrog with Bitbucket Pipelines

The diagram below shows how JFrog products can be integrated into Bitbucket Pipelines to create containerized node applications:

Diagram of the build pipeline using Bitbucket Pipelines, JFrog Artifactory, Xray and Bintray.

  1. Collect and publish your npm build information to Artifactory.
  2. Bitbucket Pipelines automates the build and test flow while using JFrog Artifactory as your repository manager.
  3. JFrog Xray scans the packages for vulnerabilities and license compliance.
  4. Promote your build to production.
  5. JFrog Bintray distributes the images closest to the target location.

For operating details, see my blog post on how to integrate JFrog's tools into Bitbucket Pipelines.

Artifactory Add-on for Bitbucket Pipelines

The new add-on that I helped create during my visit to Atlassian provides a unified dashboard for Bitbucket Pipelines that provides visibility into all of the information collected by Artifactory and Bintray in the release pipeline. Developers using JFrog tools are empowered with a 360-degree view of the full commit-to-release pipeline.

The add-on works with Pro, Enterprise and SaaS editions of Artifactory and Bintray.

When you install the add-on, you will need to provide your Artifactory and Bintray credentials (username, password, API key), and the Bintray package path.

Once the add-on is installed, you can view the dashboard from your project Repository in Bitbucket Cloud. (For example, an npm package project pipeline-npm-artifactory in the master branch.) The sidebar in this display presents a Pipeline menu option, shown with the JFrog logo. Click this menu option to view the dashboard.

Bitbucket Cloud Repository sidebar menu with JFrog add-on

The dashboard displays information that helps you to monitor the build pipeline flow through Bitbucket, Artifactory and Bintray.

The Bitbucket-JFrog dashboard, showing Bitbucket projects and their builds in Artifactory and Bintray.

The Bitbucket column lists the projects from which the corresponding builds were generated. Click the project name to view the results of that build that were logged by Pipelines.

Each commit to the Bitbucket master branch triggers Bitbucket Pipelines to start a build of the npm package. As part of that build, it pulls all the project's dependencies from Artifactory, then pushes the created npm package to Artifactory along with the build information.

In the JFrog Artifactory column of the dashboard, click the Build Info link for the desired build to view the information Artifactory has published about that build. Click the download icon next to that link to download all artifacts that are part of that build to your workstation.

As Bitbucket Pipelines helps you run your test and promote your build to different stages, the dashboard shows that progress by the Statuses (from Dev to QA to Prod).

Once the package has been promoted to production, Pipelines can push it through Artifactory to Bintray. When that occurs, it will also be reflected in the dashboard, where the package is listed in the JFrog Bintray column.

The dashboard provides visibility about all packages that have been promoted to production and pushed to Bintray. Click the repository name to view the Bintray repository, and the icons to view the released version, statistics and release notes.

Try it Out

It's fun to code solutions, but it's meaningful to know how much they're being used.

In the best interest of the Atlassian/JFrog community, we have made this add-on an open source project, without additional license. It's part of our commitment to open source enhancements for licensed JFrog products, and allows you to contribute improvements or customize the plug-in to your own needs.

You can get the dashboard add-on in the Bitbucket Repository. Complete installation instructions are in the README file.

As Atlassian evolves its products to serve its growing user base, I'm looking forward to helping people continue to make the most of Bitbucket Pipelines.

New to Artifactory?

If you haven't tried Artifactory yet, you can download a free trial from JFrog.

 

Try Bitbucket free