commit | eec77bd1b6df8a2879f4d5689af9b0974c709701 | [log] [tgz] |
---|---|---|
author | Rob Mohr <mohrr@google.com> | Thu Sep 15 22:05:12 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Sep 15 22:05:12 2022 +0000 |
tree | f3081427c909ef334eb37f21dac55f6206a4dc35 | |
parent | 399048cf646a472f039488cec670268772c24b1a [diff] |
pw_presubmit: Use 0 for bbid for led tasks Change-Id: Ie51bef618d543609e355fbb04cdc65aaae7abd0c Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/110475 Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Reviewed-by: Ted Pudlik <tpudlik@google.com> Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/presubmit.py b/pw_presubmit/py/pw_presubmit/presubmit.py index c9f9a5d..dcfaf7b 100644 --- a/pw_presubmit/py/pw_presubmit/presubmit.py +++ b/pw_presubmit/py/pw_presubmit/presubmit.py
@@ -193,8 +193,14 @@ project, bucket, builder = os.environ['BUILDBUCKET_NAME'].split(':') + bbid: int = 0 + try: + bbid = int(os.environ['BUILDBUCKET_ID']) + except ValueError: + pass + return LuciContext( - buildbucket_id=int(os.environ['BUILDBUCKET_ID']), + buildbucket_id=bbid, build_number=int(os.environ['BUILD_NUMBER']), project=project, bucket=bucket,