TravisCI upgraded to Xenial, and ChefDK install failed
tl;dr
Should you have a trouble on ChefDK install in TravisCI for Chef cookbook you maintain, you can fix it by fixing .travis.yml
What happened
I received a TravisCI notification that indicates my cookbook's weekly test build failed.
The error says ChefDK installation failed and build stopped then. Here is the log.
Root Cause
TravisCI seems to have changed the default build environment from Precise to Xenial.
I used chef-current-precise as an apt addon, so the apt source line had turned to be disabled.
How to Fix
Easy. Just fix the apt source line. Unfortunately "chef-current-xenial" is not registered in
GitHub - travis-ci/apt-source-whitelist: Whitelist of apt sources approved for build environments with restricted sudo for now. I chose to manually write an apt source line for Xenial by TravisCI instruction page, and the build passed.
Actually the diff is very small.