-
Notifications
You must be signed in to change notification settings - Fork 1
Travis CI Debug Build
Jayanth Dungavath edited this page Jan 19, 2018
·
7 revisions
- Install travis gem
gem install travis
for local scholar repo - Get your private token
travis token
- Get the respective build id from the build log under "Build system information".
- Run the following command with your private token and the job id to restart a build in debug mode
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ********************" \
-d "{\"quiet\": true}" \
https://api.travis-ci.org/job/${id}/debug
- Visit the respective build page on travis-ci.org and follow the log of debug build to find ssh command to connect to debug build via terminal
- Run something similar to
ssh <random-string>@ny2.tmate.io
from your terminal - If you get a permission denied error, run
ssh-keygen
to generate key. If you don't go with the defaults of ssh-keygen, runssh -i ~/.ssh/<NameYouProvided> <random-string>@to2.tmate.io
- After you connect to the session, you can run the following commands in order
travis_run_before_install
travis_run_install
travis_run_before_script
travis_run_script --> This triggers "bundle exec rake ci". You can modify code before running this if need be.
travis_run_after_success
travis_run_after_failure
travis_run_after_script
- Each debug build session stays active for about 30 mins +1/2. Start over if need be.