[QGIS-Developer] Woohoo! Interactive Travis debugging

Nyall Dawson nyall.dawson at gmail.com
Thu Oct 11 16:19:53 PDT 2018


On Tue, 9 Oct 2018 at 19:18, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>
> Hey all,

>
> #! /usr/bin/env bash
>   curl -s -X POST \
>    -H "Content-Type: application/json" \
>    -H "Accept: application/json" \
>    -H "Travis-API-Version: 3" \
>    -H "Authorization: token <TOKEN>" \
>    -d '{ "quiet": true }' \
>    https://api.travis-ci.org/job/<JOB_ID>/debug
>


Just a follow up here. Turns out the default configuration (shown
above) is limited to a 30 minute timeout, which isn't enough to get
all the dependencies installed and QGIS built, let alone leaving time
for debugging ;)

After some discussion with Travis staff (who have been fantastic, I've
got to say!), there's a workaround. By changing "quiet": true to
"quiet": false, the interactive session is subject to the normal 90(+)
minute timeout. The side effect is that all the commands entered are
visible to anyone looking at the Travis log, so be careful not to do
this with any sensitive information.

The command is full is:

#! /usr/bin/env bash
  curl -s -X POST \
   -H "Content-Type: application/json" \
   -H "Accept: application/json" \
   -H "Travis-API-Version: 3" \
   -H "Authorization: token <TOKEN>" \
   -d '{ "quiet": false }' \
   https://api.travis-ci.org/job/<JOB_ID>/debug


Nyall


> The Job ID is displayed in the build log after expanding "Build system
> information".
>
> 2. Head back to the web UI and in the log of your job. There you
> should see the following lines to connect to the VM:
>
> Setting up debug tools.
> Preparing debug sessions.
> Use the following SSH command to access the interactive debugging environment:
> ssh ukjiuCEkxBBnRAe32Y8xCH0zj at ny2.tmate.io
>
> 3. Connect from your computer using SSH into the interactive session,
> and once you're done, just type exit and your build will terminate.
>
> Once in the SSH session, these bash functions will come in handy to
> run the different phases in your build:
> https://docs.travis-ci.com/user/running-build-in-debug-mode/#Things-to-do-once-you-are-inside-the-debug-VM


More information about the QGIS-Developer mailing list