Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the current workflow to debug Travis builds locally?

One used to be able to download Vagrant boxes to debug Travis builds (for GitHub projects for instance). Apparently, this is no longer possible, so how do people currently debug complex Travis build chains locally?

like image 521
BenC Avatar asked Dec 12 '13 13:12

BenC


People also ask

How do you debug a Travis build?

The “Debug build” or “Debug job” button is available on the upper right corner of the build and job pages for private repositories. For open source repositories, this button is not available and you will need to use an API call instead.

What is Travis Yml file?

travis. yml , which is a YAML format text file, to the root directory of the repository. This file specifies the programming language used, the desired building and testing environment (including dependencies which must be installed before the software can be built and tested), and various other parameters.


1 Answers

One way to inspect the build (not to debug, sorry) is to send the build logs to another server on failure.

Here is an example:

after_failure   - sudo tar -czf /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz your-application-logs/   - scp /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz [email protected]:~/logs 

You could send them via email, store them on a storage server or whatever.

These logs would be useful to you if you run your tests in a debug mode and include our own logs as well in the tarball.

like image 117
Haralan Dobrev Avatar answered Oct 19 '22 06:10

Haralan Dobrev