Effortless CI/CD (and more!) on GCP using Cloud Build

By Ryan J. Price

Elevator Pitch

Writing good software is hard. Getting that software into production, or even onto the master branch of your code repo, is even harder. With Google Cloud Build, just a few lines of YAML make your whole life easier, more hands-off, and more reliable than any manual process you could ever dream up!

Description

Google Cloud Build is the CI/CD engine for the Google Cloud Platform. It allows developers to define pipelines as a concise YAML configuration, which can then build, test, and even deploy your software automatically, all with just a push to your code repo. But, since all the pipeline steps are just shell commands, and since the pipelines are run in your GCP environment, there’s no limit to the flexibility of the pipelines you define. Want to just run tests? Easy, three lines of YAML. Want to deploy artifacts to a container registry, or push source to AppEngine? Another three or so each. Want to deploy to AppEngine, wait for 60 seconds, run some functional tests against the actual prod deployment, roll it back if there’s issues, and send a Slack notification? Sure, describe it in the pipeline. Want to email Julia in accounting when 10 builds fail in a row, and ask her to expense tequila shots for the devs? Why not! If you can dream it, you can do it in Cloud Build! Like Jenkins, but less… bald.

Notes

Technical requirements

Attendees should have an understanding of software development practices, the importance of tests, the command line, and having at least heard of CI/CD (since that’s the real value of the talk, and might be new to most attendees). An understanding of Docker is helpful, since Cloud Build runs containers (explicitly) as pipeline steps.

Why me?

I’m a full believer in automation of all the things, and doing anything to make your life easier as a dev. I have used Cloud Build for projects to fully automate the deployment of my applications (test and deploy). Having used Jenkins previously quite a bit, and knowing that if you can write shell code for it, you can do it, I was immediately drawn to Cloud Build. Being serverless, low-cost (with a generous free tier), and easy-to-define makes Cloud Build one of my favorite cloud things to talk about.