Menu

Embedding Build Status Badges

Basics > Embedding Build Status Badges

This document describes how to create a badge that displays your project’s build status (passed or failed) in a README or other document.

Overview

Status badges are commonly embedded in project READMEs, although they can be placed in any web document. CircleCI provides a tool to generate embed code for status badges. By default, a badge displays the status of a project’s default branch, though you can also select other branches.

You can generate code for the following formats:

  • Image URL
  • Markdown
  • Textile
  • Rdoc
  • AsciiDoc
  • reStructuredText
  • pod

Steps

  1. In the Notifications section of your project’s settings, click Status Badges.
  2. By default, the badge displays the status of your project’s default branch. If you want to show the status of a different branch, use the Branch dropdown menu to select it.
  3. (Optional) If your project is private, you will need an API token for viewing a project’s details. If you haven’t created a token yet, click on the API Permissions in the Permissions section. Click Create Token, choose the Status scope, and create a label for the token.
  4. (Optional) If you created a token in the previous step, select the token you want to use in the API Token dropdown menu.
  5. Select the appropriate language from the Embed Code dropdown menu.
  6. Copy and paste the generated link in the document where you want to display the status badge.

Customization

If you find the default status badge too minimal, you can use the shield style. To use the shield style, replace style=svg with style=shield in the link you generated above.