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.
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
- Delayed builds which cannot run yet, because there are not free pipeline builders
- 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.
The available filters are:
- Pipeline - any of the pipelines available.
- Provider - type of Git provider.
- Repository - Git repository from the attached trigger.
- Type - build, launch a test environment.
- Branch - any of the available branches from the attached Git trigger.
- Committer - person that made the commit that triggered the build.
- Environment - which environment was affected.
- Status - success, error, in-progress, pending, terminated etc.
- Trigger type - what type of trigger was responsible for this build
- Git event - in the case of git triggers the exact event
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.
You can easily remove active filters, by clicking on them and adding/removing values.
Creating build views
Once you have a set of filters that you use regularly, you can save them as a custom Build View by clicking the Save as View button and providing a name.
Now you can select at the top of the window any of the available build views to automatically filter results according to the respective set of filters.
You can delete existing build-views by clicking on the manage views button. You can change the filters of an existing build view by making a new filter selection and then saving the view with an existing name (effectively overwriting it).
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. For each event type you will also see additional context related information.
There are also extra options if you click the small “3-dot” menu button on the right. For a particular build, you can:
- View the logs
- View the YAML
- View or add annotations
- View the images produced (and consequently launch an on-demand test environment)
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).
An extra button for test reports will be visible if you are using the test report feature of Codefresh.
Viewing details for an individual pipeline build
If you click on any individual pipeline build, 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.
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.
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:
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 or
- Select the three dots next to the “RESTART” button on the top-right, and click on Show 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:
You can then get the memory usage for the whole pipeline by clicking on the metrics tab at the bottom of the screen.
If you click on an individual step before clicking the Metrics tab you will get metrics for that specific step only.
Restarting the pipeline
You can choose to restart any pipeline by clicking the button at the top right corner.
It is important to note that “Restart from beginning” will restart a pipeline with the same state that it had in its original execution (including the original git commit). If you want to execute a pipeline again with a new state instead, you need to use the Run button in the pipeline editor and selecting any of the available triggers.
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:
Notice again that restarting a pipeline from a failed step means restarting the pipeline with the same 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.
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.
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
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.
See the build badges page for more information.