Skip to main content

Build Annotations

Abstract

Build Annotations allow you to add relevant build information directly on the Bitrise build details page, simplifying the process of accessing crucial data during build progression and debugging.

Build Annotations allow you to add relevant build information directly on the Bitrise build details page, simplifying the process of accessing crucial data during build progression and debugging.

The annotations are generated using Markdown styling. Some use cases include:

  • Detailed test results for custom tools.

  • Emphasizing warnings or error messages.

  • Security and vulnerability scan reports.

  • Static analysis reports.

  • Links to deployed artifacts.

Annotating a build

To use annotations:

  1. Add a Step capable of running custom commands.

    For example, Script or fastlane.

  2. Add a command to install the Bitrise Annotations plugin:

    bitrise plugin install https://github.com/bitrise-io/bitrise-plugins-annotations.git
  3. Use the annotate command of the plugin to create your annotations.

    The command works in the following format: bitrise :annotations annotate [markdown] [flags]. This is a basic Markdown annotation in the default style:

    bitrise :annotations annotate "**My Annotation**"

Styling and formatting your annotations

Build annotations are a snippet of Markdown. The basic style of the snippet is determined by the --style flag of the annotation command. The possible values are:

  • default:

  • warning:

  • error:

annotation-styles.png

The annotations accept Markdown syntax. In addition to simple formatting, it also supports code blocks, using the ~ character or four-space indentation:

bitrise :annotations annotate "
~~~
This is a codeblock
~~~ 
"

bitrise :annotations annotate "
    This is also a codeblock
"

You can add expandable elements to your annotations:

annotations-expand.gif
  • Place your content in a details tag to collapse it by default.

  • If you want the card to be open by default, use details open.

  • Use a summary tag to let users know what is inside the section.

  • You can include headers, images, code blocks, and more inside a collapsed section.

<details>

<summary>Example summary</summary>

### You can add a header

You can add text within a collapsed section.

You can add an image or a code block, too.

</details>