How to use build status badges in your Github and Bitbucket repos

How to use build status badges in your Github and Bitbucket repos

2 min read

Improving the feedback and iteration cycle is core to what we do at Codefresh. Beyond offering user acceptance testing in on demand staging environments, we now have build badges that can live in your repo and offer a quick look at the status of your build.

This means reviewing pull requests, code reviews, and checking on the build status of a service within the context of your entire application is much easier and more transparent. Build badges are now available in every account level, including open source.

Add a build badge to your readme.md

To start, login to Codefresh and view the pipeline of the service you want to generate a badge for. Click on the badge, then select the branch you want to report on. Paste the code into your readme.md. There are no more steps. You’ve successfully added a build badge.

Codefresh Pipeline Configuration

Clicking on the badge will take you directly into the build view so you can see all pipelines and builds (assuming you have permissions).

Getting fancy

Include the status of multiple branches

You can include multiple badge versions by adding the embed code multiple times and setting the branch parameter. This comes in handy if you want to see the status of branches going through different stages of the test and deployment pipeline.

Combining with other badges

Github user markfirmware has a nice setup showing off multiple branches mixed with other badges.
CI/CD Build Badges

Showing multiple services in a single readme

One of the core values of Codefresh comes from the ability to test each build against all the interconnected microservices.

Let’s say you have an application made up of several microservices and you’re working on updates to a Go web API and the node.js client at the same time. These might be different teams working at a different pace. With Codefresh you could always configure a composition of services based on different repositories and branches, but with build badges you can actually represent the current outcome. This way as each team updates their code, the entire composition is tested and updated.

Normally these kinds of conflicts would only be found in staging, or worse, production. By front-loading the testing you can actually create staging-less test and deployment pipelines that are faster and require less infrastructure maintenance.

Creativity knows no bounds

I’m sure someone out there is reading this thinking “I have an even better idea!” Awesome! Throw it on Github and share your repo here. We’d love to see all the ways these new build badges help agile teams build better software.

Grab the docs

Check out the full documentation to go to town with build badges and see what’s possible.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Build your GitOps skills and credibility today with a GitOps Certification.

Get GitOps Certified

Ready to Get Started?
  • safer deployments
  • More frequent deployments
  • resilient deployments