Notify on completion

This is a resubmit of the previously reverted CL, which was crashing because
the prod builder user account was not given necessary permissions for
pubsub. This change has added error handling to avoid other failures to bring
down the job as well:

Now sending a pubsub message on recipe completion which will enable running
tests as soon as builds are complete. Added bucket as well to the message to
differentiate between prod and try jobs.

Added a try catch for StepFailure to ensure that failures in gcloud pubsub do
not bring down the overall job.

Tested locally:

  led get-builder 'luci.flutter.try:Mac Host Engine' | led edit-recipe-bundle | led launch
  led get-builder 'luci.flutter.prod:Linux Fuchsia' | led edit-recipe-bundle | led launch

Verified that failing gcloud step does not fail the whole job:

  http://shortn/_HG8zHwgztC

and verified that expected messages appeared in the topic:

  {"buildername" : "Linux Fuchsia", "bucket" : "prod", "githash" : "4985b584a430ea3fda9433dccafa5047531e0974"}

This change will be superceded by user defined pubsub topic (crbug.com/843720).

Bug: https://github.com/flutter/flutter/issues/69621
Change-Id: I424cd8963372c8351940763c8813c9439777b3ba
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/9201
Commit-Queue: Yusuf Mohsinally <mohsinally@google.com>
Reviewed-by: Keyong Han <keyonghan@google.com>
57 files changed
tree: 16f6b4d0a5cc293280256cbf16c4c51bc9223677
  1. infra/
  2. recipe_modules/
  3. recipes/
  4. .gitignore
  5. .style.yapf
  6. AUTHORS
  7. branch_recipes.py
  8. LICENSE
  9. OWNERS
  10. README.md
  11. recipes.py
README.md

Flutter LUCI Recipes

This repository contains Flutter's LUCI recipes. For the LUCI infrastructure config, see flutter/infra on GitHub. Actual builds can be seen at ci.chromium.org.

Config

Tricium configurations recipes repo.

Recipe Branching for Releases

The script branch_recipes.py is used to generate new copies of the LUCI recipes for a beta release. See Recipe Branching for Releases for more information. For usage:

$ ./branch_recipes.py --help