Remove the pubsub step from the release_builder

Change-Id: I265113ba0a43acec720519110e2f9ea5030e916e
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/47480
Reviewed-by: Jesse Seales <jseales@google.com>
Commit-Queue: Drew Roen <drewroen@google.com>
diff --git a/recipes/release/release_builder.expected/dart_internal.json b/recipes/release/release_builder.expected/dart_internal.json
index b5d430f..71191ba 100644
--- a/recipes/release/release_builder.expected/dart_internal.json
+++ b/recipes/release/release_builder.expected/dart_internal.json
@@ -359,85 +359,6 @@
     "name": "display builds"
   },
   {
-    "cmd": [],
-    "name": "Publish build results"
-  },
-  {
-    "cmd": [],
-    "name": "Publish build results.ensure gcloud",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[START_DIR]/gcloud",
-      "-ensure-file",
-      "infra/3pp/tools/gcloud/${platform} version:2@428.0.0.chromium.3",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "luci_context": {
-      "realm": {
-        "name": "dart-internal:flutter"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Publish build results.ensure gcloud.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:2@428.0.\",@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/3pp/tools/gcloud/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/gcloud/bin/gcloud",
-      "pubsub",
-      "topics",
-      "publish",
-      "projects/flutter-dashboard/topics/dart-internal-build-results",
-      "--message={\"buildbucket_id\": 8945511751514863184}"
-    ],
-    "infra_step": true,
-    "luci_context": {
-      "realm": {
-        "name": "dart-internal:flutter"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Publish build results.gcloud pubsub",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
     "name": "$result"
   }
 ]
\ No newline at end of file
diff --git a/recipes/release/release_builder.py b/recipes/release/release_builder.py
index a4404f4..bf48d51 100644
--- a/recipes/release/release_builder.py
+++ b/recipes/release/release_builder.py
@@ -23,7 +23,6 @@
     'flutter/yaml',
     'flutter/display_util',
     'flutter/flutter_bcid',
-    'flutter/pubsub',
     'flutter/repo_util',
     'flutter/shard_util_v2',
     'recipe_engine/buildbucket',
@@ -40,7 +39,6 @@
 ENV_PROPERTIES = EnvProperties
 
 RELEASE_CHANNELS = ('refs/heads/beta', 'refs/heads/stable')
-BUILD_RESULT_PUBSUB_ENDPOINT = 'projects/flutter-dashboard/topics/dart-internal-build-results'
 
 
 def ShouldRun(api, git_ref, target, release_branch):
@@ -114,15 +112,6 @@
       raise_on_failure=True,
   )
 
-  not_experimental = not api.runtime.is_experimental and api.buildbucket.build.id != 0
-  dart_internal_build = api.flutter_bcid.is_official_build()
-  if not_experimental and dart_internal_build:
-    api.pubsub.publish_message(
-        BUILD_RESULT_PUBSUB_ENDPOINT,
-        json.dumps({"buildbucket_id": api.buildbucket.build_id}),
-        step_name='Publish build results'
-    )
-
 
 def GenTests(api):
   try_subbuild1 = api.shard_util_v2.try_build_message(