Skip to main content

Travis CI

Travis CI's Ubuntu 20.04 (Focal Fossa) environment includes everything Batect requires, so all that needs to be done to use Batect with Travis CI is to configure this environment and enable the Docker service.

Adding the following to your .travis.yml file selects the Ubuntu 20.04 environment and enables Docker:

.travis.yml
dist: focal

services:
- docker

You can see a full example of using Batect with Travis CI in the Java sample project.

Caching between builds

If you're using caches, you can persist these between builds with the following configuration:

.travis.yml
dist: focal

services:
- docker

env:
- BATECT_CACHE_TYPE=directory

cache:
directories:
- .batect/caches

Subscribe to the Batect newsletter

Get news and announcements direct to your inbox.