CODEFRESH.IO DOCUMENTATION

Codefresh is a Docker-native CI/CD platform.
Instantly build, test and deploy Docker images.

GET STARTED   GKE BETA

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Build badges

Overview

Badges are simple images that show you the last build status. They support both the pipeline and branch service status.
The badges can be embedded into your repository’s readme.md file.

To start using badges, simply embed:
https://g.codefresh.io/api/badges/build?*param1*=xxx&*param2*=yyy
when param1, param2, etc... are the parameters from the table below.

Query parameter
Description

branch - optional

Name of the branch
If not supplied, default is master

repoName

Name of the repository

pipelineName

Name of the pipeline

accountName

Name of the account

repoOwner

The name of the repository owner

key - optional

Token related to the account

type - optional

Badge types

cf-1 : Codefresh build status - also the default badge.

cf-2 : Codefresh build status

The goal is to combine two links together into a markdown format. The format looks like:
[![Codefresh build status]( BADGE_LINK )]( URL_TO_PIPELINE )

Step 1: Assemble Badge Link

  1. Go to the Pipelines of your service
  2. Click on the badges icon
  1. Select the branch, choose the type
  1. Copy badge in one of the formats
    • Markdown
    • Image URL
    • HTML
    • AsciiDoc

Step 2: Add to repository

Copy the markdown badge snippet.
For example:

[![Codefresh build status]( https://g.codefresh.io/api/badges/build?branch=master&repoName=demochat&repoOwner=Superfresh&pipelineName=demochat&accountName=Superfresh )]( https://g.codefresh.io/repositories/containers101/demochat/builds?filter=trigger:build;branch:master;service:58920dc51c892f0100682b62~demochat )

Add the snippet to your markdown file readme.md.

You can see an example of a badge showing the status of the [demochat] application here: (https://github.com/containers101/demochat)

Codefresh build status

Build badges