cbuildbot.py: Add an option of master_buildbucket_id

To remove all queries using cidb_id, we need to introduce
master_buildbucket_id into the child builds.

BUG=chromium:936070
TEST=run_tests

Change-Id: Idcff852eea3fbe609763ae11d9ac6e3cc8c578f6
Reviewed-on: https://chromium-review.googlesource.com/1507033
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index aeb2129..7eaea07 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -552,6 +552,10 @@
                           api=constants.REEXEC_API_MASTER_BUILD_ID,
                           help='cidb build id of the master build to this '
                                'slave build.')
+  group.add_remote_option('--master-buildbucket-id',
+                          api=constants.REEXEC_API_MASTER_BUILDBUCKET_ID,
+                          help='buildbucket id of the master build to this '
+                               'slave build.')
   group.add_remote_option('--mock-tree-status',
                           help='Override the tree status value that would be '
                                'returned from the the actual tree. Example '
@@ -992,6 +996,9 @@
     stack.Add(_SetupConnections, options, build_config)
     retry_stats.SetupStats()
 
+    # This will be deleted in CL:1491937.
+    logging.info('master_{build_id, buildbucket_id} is %s, %s',
+                 options.master_build_id, options.master_buildbucket_id)
     timeout_display_message = None
     # For master-slave builds: Update slave's timeout using master's published
     # deadline.