Public logs and status badges
Embedding Status Images and viewing public logs
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 or any other website.
Here is an example:
Clicking the badge takes you into the build view of the pipeline.
Finding the build badge of your project
In the pipeline view of a project, select the Settings tab and then click General. Next to the badges section you will find a link to the build badge.
Click on it and you will get a new dialog where you can select
- The graphical style of the badge (two styles are offered)
- The syntax for the badge
The following embedding options are available:
- Markdown for usage in text files (e.g.
- Plain HTML for normal websites
- AsciiDoc for documentation pages
- Image for any other document type
Copy the snippet in your clipboard.
Using the build badge
Paste the snippet in the file/document where you want the badge to be visible (e.g. in a Readme file in GitHub).
For example, the markdown syntax is
[![Codefresh build status]( BADGE_LINK )]( URL_TO_PIPELINE )
You can also manually change the parameters of the link by using
when param1, param2, etc… are the parameters from the table below.
|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: - also the default badge.
Everybody who looks at your readme file will also see the current build status of the associated Codefresh pipeline.
Public build logs
By default, even though the badge shows the build status for everybody, clicking the badge allows only Codefresh registered users that also have access to the pipeline to view the actual builds.
If you are working on an open-source project and wish for greater visibility, you can enable public logs (and associated badge) for your project so that any user can see the pipeline results (even if they are not logged into Codefresh).
Public logs are disabled by default and you need to explicitly enable them.
This happens for security reasons. Make sure that the logs you are exposing to the Internet do not have any sensitive information. If you are unsure, you can still use the private badge that shows project status only as explained in the previous section.
To enable the public logs, toggle the respective switch in the pipeline settings:
Then click the Save button to apply changes for your pipeline. Once that is done you will also get a second badge (public) as well as the public URL to your project.
Now you can use this badge and/or public URL anywhere and all users can view your logs without being logged into Codefresh at all (or having access to your pipeline).
Your visitors can also click on each individual pipeline step and see the logs for that step only.
If you are using Codefresh to manage a public project, you should also use the capability to trigger builds from external forks.