Using Docker Compose with Travis
Travis is a YAML-based CI/CD solution. It does provide source code hosting, but it is very well integrated with GitHub. Travis used to provide free CI/CD for open source projects, so it is very common to work on an open source project that uses Travis. The same steps we followed in the previous CI/CD vendors will also be applied to Travis.
Creating your first Travis job
Travis is YAML-based just like the previous CI/CD tools we examined. Once we enabled Travis integration with a GitHub project, a file named .travis.yml
containing the job instructions needs to be present at the root location of the project.
Our.travis.yml
base should be the following:
services: - docker cache: directories: - $HOME/.docker/cli-plugins jobs: include: - stage: "Install Compose" script: ...