Get started with Google Cloud SDK and Travis fast

written by

reviewed by

Share
Contents

written by

reviewed by

In the spirit of being fast, this tutorial will be as fast as the implementation and usage itself. Let’s get to it, running Google Cloud SDK, Docker and Kubectl. Let’s get started.

The .travis.yml

Here’s a template .travis.yml I’ve made, you can make this into a bash script to make this process more streamlined:

dist: jammy 
cache:
  directories:
  - $HOME/google-cloud-sdk
services:
- docker
env:
  global:
  - CLOUDSDK_CORE_DISABLE_PROMPTS=1 
before_install:
- if [ ! -d $HOME/google-cloud-sdk/bin ]; then
    rm -rf $HOME/google-cloud-sdk;
    curl https://sdk.cloud.google.com | bash > /dev/null;
  fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud components update kubectl
- gcloud version
install: true
script: true

You’ll notice curl will pull all the things you need from Google, then we run gcloud components update kubectl, and we make sure we Docker listed as a service. Your build should look similar to this:

All done!

Conclusion

You now have a great template to get gcloud setup quickly with Docker and Kubectl.

As always, if you have any questions about this tutorial, please email me at [email protected] and I will assist you.

Happy building!

written by

reviewed by

Share this article

Related Articles

Welcome to the New Travis CI

The new look, the new site, and this new developer-first direction mark the beginning of a new era for Travis…

Docker Swarm vs Kubernetes

Among all the tools aimed at orchestrating containers, the two leading players are Docker Swarm and Kubernetes. Both provide solutions…

Simple to start. 
Intuitive to extend.

Simple to start.

Intuitive to extend.

Developed upon by hundreds of thousands.
Newsletter
Get tips, promotions and exclusive offers
© Copyright 2026, All Rights Reserved