November 4, 2021
Introducing: Clear cache action
A CI/CD tool is meant to speed up building, testing and deployment of software, period. This why we've always put so much effort on making our pipelines as fast as possible.
One of the main factors that make Buddy so fast is the way it utilizes its cache. By default, Buddy caches:
- repository files
- Docker layers
- service data (e.g. databases required for application tests)
However, at times you may not want to use the cache and build everything from scratch instead. Until now, there were two options to achieve that:
- Checking the 'Clear cache' flag when running the pipeline
- Forcing the pipeline to run without the cache in the pipeline settings
With this week's release you can add a dedicated action to your pipeline that will specify what exactly you want to purge in the pipeline:
- Cached Docker layers
- Pipeline filesystem (cached dependencies, repository files)
- Cache of attached services
- Additional cache in build actions used to store files outside pipeline filesystem
Clear cache action overview
Adding the action to your pipeline opens a new array of possibilities:
The action can be added to any place in the pipeline. Let's assume that the application that you are building requires a configuration file generated with sensitive data fetched from environment variables. Once the config is deployed to the production server, you can purge the filesystem files together with the generated config.
You can define when the action should run using trigger conditions. For example, you can purge the cache only on changes to
package-lock.jsonas we want to build the application afresh together with all dependencies.
In this case, we first create a pipeline like here:
Then, we go to cache action details and set up the condition for the changeset:
Trigger conditions in the cache action
Although the use cases above may look a bit user-specific, they can be easily adjusted to any developer workflow thanks to the way Buddy's UI/UX is designed. The tool also offers other methods of pipeline optimization, including multi-condition triggers that let you precisely define what should be run and when, environment variables, crucial for running scripts, deployments, and storing sensitive data, or caching data from services attached to your builds actions, greatly speeding up the execution time.
Customer Success Manager