I am currently looking for ways to obtain all job log files(such as https://api.travis-ci.org/v3/job/6073028/log.txt) from public repositories (such as apache/commons-math) in Travis CI using Travis CI API.
I would like to know if it is possible, and how to do it.
You can create a script and inside it make an API call , such as :
get-logs.sh
then call the script later:
sh get-logs.sh > travisLogs.log
${TOKEN}
is the token you have for your travis repository. https://blog.travis-ci.com/2013-01-28-token-token-token${TRAVIS_JOB_ID}
the id of the job, this is a travis variable too, so if this is inside a.travis.yml
it will get the current job Id.Ref: https://developer.travis-ci.org/resource/log#Log