Challenge 3: You break the build, you buy cake

Previous Challenge Next Challenge

Introduction

This task is all about automating things using Cloud Build. When multiple people work on the same project and contribute to the same repository it’s good to have a Continuous Integration pipeline that can lint, test and package the source code everytime new commits are pushed. In this challenge we’ll use the provided build pipeline to automate this process. It will generate and store the newest version of the Python package, which contains the training code, when there’s a new commit.

Description

Once things look fine locally, set up a Cloud Build Trigger that’s run when code is pushed to the repository. The code base already includes a build configuration (cloudbuild.yaml), have a look at it to understand what it does. Make sure that the trigger uses that build configuration and the Compute Engine Default Service Account as the service account. Name the trigger CI (or continuous-integration).

Warning
The qwiklabs environment only has quota in the global region, make sure that you pick that when you’re creating the trigger.

Success Criteria

  1. There’s a new Cloud Build push trigger called CI (or continuous-integration).
  2. The trigger is connected to the Cloud Source Repository created in the previous challenge.
  3. The trigger uses the provided (fully configured) build configuration.
  4. And there’s at least one successful build.

Tips

  • You will need to make some minor changes to the Python code base to have a successful run.

Learning Resources

Previous Challenge Next Challenge