Monitoring pipelines

Viewing your builds and logs

All pipeline activity in Codefresh can be viewed on the Builds tab. There is one global view from the left-side menu that shows builds for all projects across your organization and a project-based view from the settings inside an individual project.

Both views have the same controls and filters.

Viewing pipeline status

Each screen contains all builds sorted from the most recent to the oldest. The first time you visit the screen there are no filters defined.

Pipeline Activity in Codefresh

Pipeline activity (click to enlarge)

By default, it shows all builds that happening in Codefresh. To narrow the list you can use the filters on the top of the screen.

Applying filters on the build view

Directly above the list you can find several filters.

At the most basic level you can choose between

  • Running builds that are currently executing
  • Pending builds which are queued and waiting to start
  • All builds regardless of running stage (this is the default)

You can further filter the builds by choosing the various filter types that specify the build job

Pipeline filters in Codefresh

Available filters (click to enlarge)

The available filters are:

  • Repositories - any of the linked repositories
  • Branches - any of the available branches
  • Committers - person that made the commit that triggered the build
  • Status - success, error, in-progress, pending, terminated
  • Type - build, launch a test environment

Notice that all filters are multiple-choice so you can select multiple values for each filter category. At any given point you can see all the active filters on top of the screen.

Pipeline filters in Codefresh

Active filters (click to enlarge)

You can easily remove active filters, by clicking on them and adding/removing values.

For each individual build you can see several details such as the git hash, the person that made the commit, the pipeline that was triggered as well as how much time it took. On the right side you can see the docker images that belong to this pipeline, the codefresh.yml file that was executed behind the scenes as well as the logs (explained later on).

build details in Codefresh

Build details (click to enlarge)

There are also two extra options if you click the small “3-dot” menu button on the right. You can rebuild a pipeline or launch a test environment from the resulting Docker image.

Notice that if you restart a pipeline it will trigger with the exact settings it originally had. So if this was a manual trigger where you disabled caching or changed the notification options, the new execution will still honor those settings (even if you have changed them for later builds).

Viewing details for an individual pipeline build

If you click on any individual pipeline you will enter the pipeline build information screen. From here you can see more details for a build such as the logs, running time and resource metrics.

Pipeline view

Pipeline view

Each section in this screen corresponds to each pipeline step. There are two special steps:

  • Initializing Process
  • Cloning main repository

These are Codefresh built-in steps and will appear for most builds (you can also create a pipeline that doesn’t clone a git repository by default). The rest of the step names depend on your codefresh.yml (or the default step names provided by Codefresh). The different columns take the names from the defined pipeline stages.

Viewing logs from pipeline steps

Click on each step in order to see the respective log.

step details in Codefresh

Step details (click to enlarge)

You can copy the step logs with the copy to clipboard button at the top left corner of the log window. You can also search the logs by clicking at magnifying glass icon at the top right corner in the log window.

Reviewing the yaml for the pipeline

From the step details you can also click on the yaml tab to see the yaml segment for that individual step:

Step Yaml

Step Yaml

If you want to see the yaml for the whole pipeline, click the YAML tab on the bottom left corner without selecting a step first.

Pipeline Yaml

Pipeline Yaml

In both cases you can copy to clipboard the yaml shown using the button at the top left corner.

Viewing pipeline metrics

Codefresh offers several metrics for pipeline steps that allow you to get a better overview on the resources consumed by your pipeline.

At the most basic level Codefresh will show some quick metrics while the pipeline is running that include memory consumed and size of logs:

Pipeline running metrics

Pipeline running metrics

You can then get the memory usage for the whole pipeline by clicking on the metrics tab at the bottom of the screen.

Pipeline detailed metrics

Pipeline detailed metrics

If you click on an individual step before clicking the Metrics tab you will get metrics for that specific step only.

Step metrics

Step metrics

Restarting the pipeline

You can choose to restart any pipeline by clicking the button at the top right corner.

Restart a pipeline

Restart a pipeline

If the pipeline has failed, you can choose to restart it only from the failed step and onwards.

You can also restart from a failed step right from the graphical view:

Restart from a failed step

Restart from a failed step

Notice that in all cases Restart means restarting the pipeline with the exact state that it had at the point in time (including the original git commit).

If your pipeline has some flaky steps, you can also use the retry syntax in your yaml instead of restarting them manually each time they fail.

Monitoring Pipelines outside the Codefresh UI

You don’t always have to be in the Codefresh UI in order to monitor the status of your builds.

Monitoring Pipelines that check Pull requests

One of the most important roles of a CI platform is to automatically update the status of a GIT Pull request with the result of the respective build.

Pull Request Status

Pull Request Status (click image to enlarge)

If you have setup a GIT trigger in Codefresh then by default this happens automatically without any other configuration for all automated commits (that are coming from webhooks).

If you start a build manually then by default the git status will not be updated (i.e. the result of the pipeline will not affect the status of Pull request)

If you don’t want this behavior to happen, you can enable the git status update checkbox when you launch a pipeline.

Update git status for pipelines triggered manually

Update git status for pipelines triggered manually (click image to enlarge)

This way the pipeline status will change the build status even with manual builds.

The same behavior is also available to the Codefresh CLI. In that case use the parameter --enable-notifications to specify if manually triggering a build will also change the GIT status.

For open source projects you also have the ability to trigger builds from external forks.

Viewing Pipeline status from text/html files

Codefresh also supports build badges that allow you to show the status of Pipeline in Text files or web pages.

Codefresh build badges

Codefresh build badges

See the build badges page for more information.