Enable `sudo` only in the required build
Enable `sudo` only in the required build

Currently, PostgreSQL + Ruby 2.5.1 build has failed.

https://travis-ci.org/rails/rails/jobs/427502723#L2940-L2942
https://travis-ci.org/rails/rails/jobs/427496382#L2921-L2923
https://travis-ci.org/rails/rails/jobs/427470858#L2921-L2923

This is because PostgreSQL server abnormally terminates when ramfs
becomes full.
Ref: https://travis-ci.org/rails/rails/jobs/427960998#L7614

This occurs since d54d0c95750e2693da495b75ac5fa0280253972d.
In d54d0c95750e2693da495b75ac5fa0280253972d, `sudo` is used in preprocessing
for setting MySQL.

In Travis, even if specified `sudo: false`, when using `sudo` in build,
sudo-enabled infrastructure is used.
https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system

As container-based infrastructure was changed to sudo-enabled infrastructure,
the disk settings etc were also changed, it seems that this phenomenon occurred.

This can also be handled by extending ramfs(https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213).
However, using sudo-enabled in all builds affects the execution time of
build, so I think that it is good to use sudo-enabled only in the necessary builds.

betesh/rails,georgeclaghorn/rails,rafaelfranca/omg-rails,baerjam/rails,shioyama/rails,prathamesh-sonpatki/rails,mohitnatoo/rails,shioyama/rails,illacceptanything/illacceptanything,eileencodes/rails,kmcphillips/rails,schuetzm/rails,Stellenticket/rails,Erol/rails,mechanicles/rails,gauravtiwari/rails,tgxworld/rails,yhirano55/rails,Stellenticket/rails,vipulnsward/rails,betesh/rails,joonyou/rails,flanger001/rails,yalab/rails,gauravtiwari/rails,mohitnatoo/rails,yhirano55/rails,yalab/rails,baerjam/rails,notapatch/rails,Erol/rails,georgeclaghorn/rails,rails/rails,joonyou/rails,rails/rails,notapatch/rails,starknx/rails,illacceptanything/illacceptanything,yhirano55/rails,iainbeeston/rails,notapatch/rails,rails/rails,arunagw/rails,MSP-Greg/rails,mechanicles/rails,mohitnatoo/rails,illacceptanything/illacceptanything,Erol/rails,yawboakye/rails,mechanicles/rails,palkan/rails,yahonda/rails,arunagw/rails,arunagw/rails,illacceptanything/illacceptanything,Envek/rails,illacceptanything/illacceptanything,betesh/rails,gauravtiwari/rails,joonyou/rails,baerjam/rails,fabianoleittes/rails,bogdanvlviv/rails,starknx/rails,lcreid/rails,Envek/rails,EmmaB/rails-1,palkan/rails,yawboakye/rails,illacceptanything/illacceptanything,yahonda/rails,Vasfed/rails,fabianoleittes/rails,kddeisz/rails,mechanicles/rails,rafaelfranca/omg-rails,arunagw/rails,bogdanvlviv/rails,prathamesh-sonpatki/rails,iainbeeston/rails,esparta/rails,Erol/rails,georgeclaghorn/rails,yahonda/rails,printercu/rails,BlakeWilliams/rails,kddeisz/rails,Stellenticket/rails,bogdanvlviv/rails,MSP-Greg/rails,vipulnsward/rails,repinel/rails,jeremy/rails,BlakeWilliams/rails,schuetzm/rails,notapatch/rails,Edouard-chin/rails,yahonda/rails,lcreid/rails,yawboakye/rails,printercu/rails,vipulnsward/rails,baerjam/rails,shioyama/rails,EmmaB/rails-1,georgeclaghorn/rails,prathamesh-sonpatki/rails,tjschuck/rails,tjschuck/rails,fabianoleittes/rails,tjschuck/rails,BlakeWilliams/rails,palkan/rails,repinel/rails,illacceptanything/illacceptanything,schuetzm/rails,utilum/rails,flanger001/rails,repinel/rails,yalab/rails,betesh/rails,bogdanvlviv/rails,MSP-Greg/rails,repinel/rails,mohitnatoo/rails,eileencodes/rails,Edouard-chin/rails,jeremy/rails,jeremy/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,flanger001/rails,schuetzm/rails,lcreid/rails,Vasfed/rails,iainbeeston/rails,BlakeWilliams/rails,utilum/rails,tgxworld/rails,kmcphillips/rails,palkan/rails,tjschuck/rails,illacceptanything/illacceptanything,tgxworld/rails,printercu/rails,kmcphillips/rails,iainbeeston/rails,tgxworld/rails,utilum/rails,MSP-Greg/rails,Vasfed/rails,Stellenticket/rails,Vasfed/rails,yalab/rails,flanger001/rails,kddeisz/rails,illacceptanything/illacceptanything,kddeisz/rails,utilum/rails,printercu/rails,yawboakye/rails,illacceptanything/illacceptanything,shioyama/rails,illacceptanything/illacceptanything,prathamesh-sonpatki/rails,yhirano55/rails,eileencodes/rails,rails/rails,esparta/rails,lcreid/rails,illacceptanything/illacceptanything,jeremy/rails,esparta/rails,rafaelfranca/omg-rails,fabianoleittes/rails,Envek/rails,illacceptanything/illacceptanything,joonyou/rails,Envek/rails,EmmaB/rails-1,starknx/rails,Edouard-chin/rails,Edouard-chin/rails,vipulnsward/rails,esparta/rails,kmcphillips/rails,eileencodes/rails