DEV Community

Discussion on: Debugging Travis CI without Commits

Collapse
 
sethmlarson profile image
Seth Michael Larson

If you can afford to use CircleCI then you don't have those problems. Just given how many Free-Tier builds that Travis CI processes every year I'd say that the vast majority of the Open Source community can't afford CircleCI.

Travis supports using Docker during builds but doesn't support running pre-defined Dockerfiles.

Forgive me if I'm wrong (I haven't used Docker at all) but doesn't Docker inherit your current operating system? If that's the case then you'd also require being on the same platform which isn't feasible.

I'd also say that Docker isn't built for Windows <10 or Mac OS yet, so if you're on those platforms you don't have access to Docker builds locally.

Collapse
 
daniel15 profile image
Daniel Lo Nigro • Edited

If you can afford to use CircleCI then you don't have those problems.

CircleCI have a free version for open-source projects. We use it for Yarn. It's faster than Travis, more reliable, more customizable, has the ability to archive build artifacts, and they have some more advanced debugging features like the ability to SSH into the build box (which is fantastic for inspecting the environment when the build fails). We do the main builds on CircleCI, and only some auxiliary builds that are okay to be a bit slower (like testing on older Node.js versions) on Travis.

Forgive me if I'm wrong (I haven't used Docker at all) but doesn't Docker inherit your current operating system?

Docker images are self-contained. It doesn't matter if you're on Windows, Linux, or MacOS, the Docker image will function exactly the same way. The Docker image contains the OS for your build, along with all the other dependencies. For example, there's a Node.js Docker image that contains Debian Linux (or Alpine Linux) + Node.js. If you use that Docker image, you will always be using Debian Linux + Node.js, regardless of whether you're running the image on Windows, MacOS, or Linux. If you need some additional tools, you can make your own Dockerfile that inherits from another one, and run some extra commands (like apt-get to install more programs).

This also means that your CI environment will be exactly identical to your dev environment, if you use the same Docker image in both.

I'd also say that Docker isn't built for Windows <10 or Mac OS yet

Docker is available for MacOS. Agree that it's only available on Windows 10, but most Windows devs I know are on Windows 10. There's very very few that are still on Windows 8, and even fewer that are still on Vista.

Developers don't have to use the Docker image, but is really helps in ensuring a consistent environment across dev, CI, and prod.