Search code examples
travis-cibuild-process

How to get log files generated during Travis build?


I have a Travis build that keeps failing, and I'm trying to get the .env file mentioned in the env-file below. I tried putting after_failure: "cat /Users/travis/.opam/system/build/topkg.0.9.0/topkg-19768-81a3ce.env" in the yml, but it didn't do anything. How would I go about getting this file? This is also during a before_install step.

#=== ERROR while installing topkg.0.9.0 =======================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false
# path         /Users/travis/.opam/system/build/topkg.0.9.0
# compiler     system (4.05.0)
# exit-code    2
# env-file     /Users/travis/.opam/system/build/topkg.0.9.0/topkg-20472-81a3ce.env
# stdout-file  /Users/travis/.opam/system/build/topkg.0.9.0/topkg-20472-81a3ce.out
# stderr-file  /Users/travis/.opam/system/build/topkg.0.9.0/topkg-20472-81a3ce.err
### stdout ###
# Cannot find file topfind.
### stderr ###
# Unknown directive 'require'.

Solution

  • I reached out to Travis support on this and they told me that any errors during the before_install step will not generate the contents of a log into the Travis build log.