Closed MikeTheCanuck closed 6 years ago
I just ran a few experiments on the transportation-systems-backend-2018 repo to compare the build speed for a job with the sudo: required
directive vs a job without that directive.
It appears that at best, the build jobs take about the same time - 2:07 vs 2:10 was the closest I could get them to go.
Diving deeper into Travis' blog and some of the interwebs articles, it's unclear whether the sudo: required
directive does anything anymore:
sudo: false
sudo: false
must be accompanied by dist: trusty
?services: docker
will force the job to run in sudo-enabled linux (Ubuntu Trusty) environment on Google Cloud Enginedocker
commands in the build require a non-Docker environment - at minimum, by specifying the services: docker
directiveFor funsies I eliminated the services: docker
directive from one of our repos' .travis.yml
to see what happens - this is the tail end of the Travis build log from that commit:
$ bin/build.sh -p
Building [secure]-service
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
The command "bin/build.sh -p" exited with 1.
0.85s$ bin/test.sh -p
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
The command "bin/test.sh -p" exited with 1.
Done. Your build exited with 1.
Looks like we're stuck in GCE non-containerized, slower build environment - at least, for any repo build that generates or uses Docker images.
Jaron is reporting network timeouts for
civic
builds in Travis: https://travis-ci.org/hackoregon/civic/jobs/389552399 https://travis-ci.org/hackoregon/civic/jobs/389589641e.g.
And Travis acknowledges network issues in their sudo-enabled GCE infrastructure:
I've wondered since last year whether we still require
sudo: required
in our Travis builds (e.g. https://github.com/hackoregon/transportation-systems-backend-2018/blob/staging/.travis.yml#L1) - this is the setting which is causing our Travis builds to run in this environment rather than containerized (https://docs.travis-ci.com/user/reference/overview/).I've never had time or need to chase this down, but maybe's the time for us to experiment with a couple of repos and see if we can avoid it? I just did a search on
transportation-systems-backend-2018
and it appears the only place we usesudo
there is in thestart.sh
script, which isn't called in the Travis environment. So I'd like to start there:Unfortunately, this
sudo: required
directive doesn't appear in the civic Travis config (https://github.com/hackoregon/civic/blob/master/.travis.yml), so I'm going to guess that the Travis network issues extend beyond just the "sudo-enabled GCE infrastructure".