Honor enabled_branches property from ci.yaml.

This is required to enable/disable builders directly from ci.yaml.

Change-Id: If5c94e2d1eefd3efc5972125678bb90989d7df42
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/37121
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Drew Roen <drewroen@google.com>
diff --git a/recipes/release/release_builder.expected/basic_linux_beta.json b/recipes/release/release_builder.expected/basic_linux_beta.json
index 531b0da..b3cf267 100644
--- a/recipes/release/release_builder.expected/basic_linux_beta.json
+++ b/recipes/release/release_builder.expected/basic_linux_beta.json
@@ -15,7 +15,7 @@
     ],
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -46,7 +46,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -72,7 +72,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -97,7 +97,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -126,7 +126,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -151,7 +151,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -178,7 +178,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -215,7 +215,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -243,7 +243,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -267,6 +267,10 @@
       "@@@STEP_LOG_LINE@json.output@      \"recipe\": \"engine/something\"@@@",
       "@@@STEP_LOG_LINE@json.output@    }, @@@",
       "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"enabled_branches\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"beta\", @@@",
+      "@@@STEP_LOG_LINE@json.output@        \"main\"@@@",
+      "@@@STEP_LOG_LINE@json.output@      ], @@@",
       "@@@STEP_LOG_LINE@json.output@      \"name\": \"linux packaging one\", @@@",
       "@@@STEP_LOG_LINE@json.output@      \"properties\": {@@@",
       "@@@STEP_LOG_LINE@json.output@        \"$flutter/osx_sdk\": \"{\\\"sdk_version\\\": \\\"14a5294e\\\"}\"@@@",
@@ -293,7 +297,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -304,7 +308,7 @@
       }
     },
     "name": "launch builds.schedule",
-    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"Linux Engine Drone\", \"project\": \"proj\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gerritChanges\": [{\"change\": \"123456\", \"host\": \"flutter-review.googlesource.com\", \"patchset\": \"7\", \"project\": \"mirrors/engine\"}], \"gitilesCommit\": {\"host\": \"flutter.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"mirrors/engine\", \"ref\": \"refs/heads/beta\"}, \"priority\": 25, \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"build\": {\"name\": \"linux packaging one\", \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}}, \"recipe\": \"release/something\", \"scheduler\": \"release\"}, \"environment\": \"Staging\", \"recipe\": \"release/something\", \"repository\": \"engine\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"cq_experimental\", \"value\": \"false\"}, {\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"Linux Engine Drone\", \"project\": \"prod\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gerritChanges\": [{\"change\": \"123456\", \"host\": \"flutter-review.googlesource.com\", \"patchset\": \"7\", \"project\": \"mirrors/engine\"}], \"gitilesCommit\": {\"host\": \"flutter.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"mirrors/engine\", \"ref\": \"refs/heads/beta\"}, \"priority\": 25, \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"build\": {\"enabled_branches\": [\"beta\", \"main\"], \"name\": \"linux packaging one\", \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}}, \"recipe\": \"release/something\", \"scheduler\": \"release\"}, \"environment\": \"Staging\", \"recipe\": \"release/something\", \"repository\": \"engine\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"cq_experimental\", \"value\": \"false\"}, {\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -329,7 +333,7 @@
       "@@@STEP_LOG_LINE@request@        \"builder\": {@@@",
       "@@@STEP_LOG_LINE@request@          \"bucket\": \"try\", @@@",
       "@@@STEP_LOG_LINE@request@          \"builder\": \"Linux Engine Drone\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"project\": \"proj\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"project\": \"prod\"@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"exe\": {@@@",
       "@@@STEP_LOG_LINE@request@          \"cipdVersion\": \"refs/heads/main\"@@@",
@@ -359,6 +363,10 @@
       "@@@STEP_LOG_LINE@request@            \"sdk_version\": \"14a5294e\"@@@",
       "@@@STEP_LOG_LINE@request@          }, @@@",
       "@@@STEP_LOG_LINE@request@          \"build\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"enabled_branches\": [@@@",
+      "@@@STEP_LOG_LINE@request@              \"beta\", @@@",
+      "@@@STEP_LOG_LINE@request@              \"main\"@@@",
+      "@@@STEP_LOG_LINE@request@            ], @@@",
       "@@@STEP_LOG_LINE@request@            \"name\": \"linux packaging one\", @@@",
       "@@@STEP_LOG_LINE@request@            \"properties\": {@@@",
       "@@@STEP_LOG_LINE@request@              \"$flutter/osx_sdk\": {@@@",
@@ -422,7 +430,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -448,7 +456,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
diff --git a/recipes/release/release_builder.expected/basic_linux_main.json b/recipes/release/release_builder.expected/basic_linux_main.json
index e3eeaf3..98d4b95 100644
--- a/recipes/release/release_builder.expected/basic_linux_main.json
+++ b/recipes/release/release_builder.expected/basic_linux_main.json
@@ -15,7 +15,7 @@
     ],
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -47,7 +47,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -73,7 +73,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -98,7 +98,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -127,7 +127,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -152,7 +152,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -179,7 +179,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -216,7 +216,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -244,7 +244,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -268,6 +268,10 @@
       "@@@STEP_LOG_LINE@json.output@      \"recipe\": \"engine/something\"@@@",
       "@@@STEP_LOG_LINE@json.output@    }, @@@",
       "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"enabled_branches\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"beta\", @@@",
+      "@@@STEP_LOG_LINE@json.output@        \"main\"@@@",
+      "@@@STEP_LOG_LINE@json.output@      ], @@@",
       "@@@STEP_LOG_LINE@json.output@      \"name\": \"linux packaging one\", @@@",
       "@@@STEP_LOG_LINE@json.output@      \"properties\": {@@@",
       "@@@STEP_LOG_LINE@json.output@        \"$flutter/osx_sdk\": \"{\\\"sdk_version\\\": \\\"14a5294e\\\"}\"@@@",
@@ -294,7 +298,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -305,7 +309,7 @@
       }
     },
     "name": "launch builds.schedule",
-    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"Linux Engine Drone\", \"project\": \"proj\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gerritChanges\": [{\"change\": \"123456\", \"host\": \"flutter-review.googlesource.com\", \"patchset\": \"7\", \"project\": \"mirrors/engine\"}], \"gitilesCommit\": {\"host\": \"flutter.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"mirrors/engine\", \"ref\": \"refs/heads/main\"}, \"priority\": 25, \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"build\": {\"name\": \"linux one\", \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"release_build\": true}, \"recipe\": \"engine/something\"}, \"environment\": \"Staging\", \"recipe\": \"engine/something\", \"release_build\": true, \"repository\": \"engine\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"cq_experimental\", \"value\": \"false\"}, {\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"Linux Engine Drone\", \"project\": \"prod\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gerritChanges\": [{\"change\": \"123456\", \"host\": \"flutter-review.googlesource.com\", \"patchset\": \"7\", \"project\": \"mirrors/engine\"}], \"gitilesCommit\": {\"host\": \"flutter.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"mirrors/engine\", \"ref\": \"refs/heads/main\"}, \"priority\": 25, \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"build\": {\"name\": \"linux one\", \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"release_build\": true}, \"recipe\": \"engine/something\"}, \"environment\": \"Staging\", \"recipe\": \"engine/something\", \"release_build\": true, \"repository\": \"engine\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"cq_experimental\", \"value\": \"false\"}, {\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -330,7 +334,7 @@
       "@@@STEP_LOG_LINE@request@        \"builder\": {@@@",
       "@@@STEP_LOG_LINE@request@          \"bucket\": \"try\", @@@",
       "@@@STEP_LOG_LINE@request@          \"builder\": \"Linux Engine Drone\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"project\": \"proj\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"project\": \"prod\"@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"exe\": {@@@",
       "@@@STEP_LOG_LINE@request@          \"cipdVersion\": \"refs/heads/main\"@@@",
@@ -401,6 +405,125 @@
     ]
   },
   {
+    "cmd": [
+      "bb",
+      "batch",
+      "-host",
+      "cr-buildbucket.appspot.com"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "prod:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "launch builds.schedule (2)",
+    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"Linux Engine Drone\", \"project\": \"prod\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gerritChanges\": [{\"change\": \"123456\", \"host\": \"flutter-review.googlesource.com\", \"patchset\": \"7\", \"project\": \"mirrors/engine\"}], \"gitilesCommit\": {\"host\": \"flutter.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"mirrors/engine\", \"ref\": \"refs/heads/main\"}, \"priority\": 25, \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}, \"build\": {\"enabled_branches\": [\"beta\", \"main\"], \"name\": \"linux packaging one\", \"properties\": {\"$flutter/osx_sdk\": {\"sdk_version\": \"14a5294e\"}}, \"recipe\": \"release/something\", \"scheduler\": \"release\"}, \"environment\": \"Staging\", \"recipe\": \"release/something\", \"repository\": \"engine\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"cq_experimental\", \"value\": \"false\"}, {\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"scheduleBuild\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@          \"bucket\": \"try\", @@@",
+      "@@@STEP_LOG_LINE@json.output@          \"builder\": \"Linux Engine Drone\", @@@",
+      "@@@STEP_LOG_LINE@json.output@          \"project\": \"prod\"@@@",
+      "@@@STEP_LOG_LINE@json.output@        }, @@@",
+      "@@@STEP_LOG_LINE@json.output@        \"id\": \"8922054662172514001\"@@@",
+      "@@@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@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"scheduleBuild\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"bucket\": \"try\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": \"Linux Engine Drone\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"project\": \"prod\"@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"exe\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"cipdVersion\": \"refs/heads/main\"@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"experimental\": \"NO\", @@@",
+      "@@@STEP_LOG_LINE@request@        \"experiments\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"luci.buildbucket.parent_tracking\": false@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", @@@",
+      "@@@STEP_LOG_LINE@request@        \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@request@          {@@@",
+      "@@@STEP_LOG_LINE@request@            \"change\": \"123456\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"host\": \"flutter-review.googlesource.com\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"patchset\": \"7\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"mirrors/engine\"@@@",
+      "@@@STEP_LOG_LINE@request@          }@@@",
+      "@@@STEP_LOG_LINE@request@        ], @@@",
+      "@@@STEP_LOG_LINE@request@        \"gitilesCommit\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"host\": \"flutter.googlesource.com\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"project\": \"mirrors/engine\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"ref\": \"refs/heads/main\"@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"priority\": 25, @@@",
+      "@@@STEP_LOG_LINE@request@        \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"$flutter/osx_sdk\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"sdk_version\": \"14a5294e\"@@@",
+      "@@@STEP_LOG_LINE@request@          }, @@@",
+      "@@@STEP_LOG_LINE@request@          \"build\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"enabled_branches\": [@@@",
+      "@@@STEP_LOG_LINE@request@              \"beta\", @@@",
+      "@@@STEP_LOG_LINE@request@              \"main\"@@@",
+      "@@@STEP_LOG_LINE@request@            ], @@@",
+      "@@@STEP_LOG_LINE@request@            \"name\": \"linux packaging one\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@request@              \"$flutter/osx_sdk\": {@@@",
+      "@@@STEP_LOG_LINE@request@                \"sdk_version\": \"14a5294e\"@@@",
+      "@@@STEP_LOG_LINE@request@              }@@@",
+      "@@@STEP_LOG_LINE@request@            }, @@@",
+      "@@@STEP_LOG_LINE@request@            \"recipe\": \"release/something\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"scheduler\": \"release\"@@@",
+      "@@@STEP_LOG_LINE@request@          }, @@@",
+      "@@@STEP_LOG_LINE@request@          \"environment\": \"Staging\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"recipe\": \"release/something\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"repository\": \"engine\"@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-00000000133a\", @@@",
+      "@@@STEP_LOG_LINE@request@        \"swarming\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"parentRunId\": \"fake-task-id\"@@@",
+      "@@@STEP_LOG_LINE@request@        }, @@@",
+      "@@@STEP_LOG_LINE@request@        \"tags\": [@@@",
+      "@@@STEP_LOG_LINE@request@          {@@@",
+      "@@@STEP_LOG_LINE@request@            \"key\": \"cq_experimental\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"value\": \"false\"@@@",
+      "@@@STEP_LOG_LINE@request@          }, @@@",
+      "@@@STEP_LOG_LINE@request@          {@@@",
+      "@@@STEP_LOG_LINE@request@            \"key\": \"parent_buildbucket_id\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"value\": \"8945511751514863184\"@@@",
+      "@@@STEP_LOG_LINE@request@          }, @@@",
+      "@@@STEP_LOG_LINE@request@          {@@@",
+      "@@@STEP_LOG_LINE@request@            \"key\": \"user_agent\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"value\": \"recipe\"@@@",
+      "@@@STEP_LOG_LINE@request@          }@@@",
+      "@@@STEP_LOG_LINE@request@        ]@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
+      "@@@STEP_LINK@8922054662172514001@https://cr-buildbucket.appspot.com/build/8922054662172514001@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "collect builds"
   },
@@ -419,12 +542,13 @@
       "cr-buildbucket.appspot.com",
       "-interval",
       "20s",
-      "8945511751514863186"
+      "8945511751514863186",
+      "8922054662172514001"
     ],
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -450,7 +574,7 @@
     "infra_step": true,
     "luci_context": {
       "realm": {
-        "name": "proj:try"
+        "name": "prod:try"
       },
       "resultdb": {
         "current_invocation": {
@@ -461,7 +585,7 @@
       }
     },
     "name": "collect builds.collect.get",
-    "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8945511751514863186\"}}]}",
+    "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8945511751514863186\"}}, {\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514001\"}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -519,6 +643,12 @@
       "@@@STEP_LOG_LINE@request@        \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
       "@@@STEP_LOG_LINE@request@        \"id\": \"8945511751514863186\"@@@",
       "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }, @@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"getBuild\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
+      "@@@STEP_LOG_LINE@request@        \"id\": \"8922054662172514001\"@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
       "@@@STEP_LOG_LINE@request@    }@@@",
       "@@@STEP_LOG_LINE@request@  ]@@@",
       "@@@STEP_LOG_LINE@request@}@@@",
diff --git a/recipes/release/release_builder.py b/recipes/release/release_builder.py
index a96822f..301c980 100644
--- a/recipes/release/release_builder.py
+++ b/recipes/release/release_builder.py
@@ -31,10 +31,6 @@
   'recipe_engine/step',
 ]
 
-GIT_REPO = \
-  'https://flutter.googlesource.com/mirrors/engine'
-
-
 PROPERTIES = InputProperties
 ENV_PROPERTIES = EnvProperties
 
@@ -51,7 +47,10 @@
     return True
   # Packaging for the flutter repository.
   if (target.get('scheduler') == 'release' and for_this_platform
-      and (git_ref in RELEASE_CHANNELS)):
+      # TODO(godofredoc): Uncomment the next line after testing is complete.
+      # and (git_ref in RELEASE_CHANNELS)
+      and git_ref.replace('refs/heads/', '') in target.get('enabled_branches', [])
+     ):
     return True
   return False
 
@@ -114,7 +113,8 @@
           'scheduler': 'release',
           'properties': {
               '$flutter/osx_sdk': '{"sdk_version": "14a5294e"}'
-          }
+          },
+          'enabled_branches': ['beta', 'main']
       }
     ]
   }
@@ -124,7 +124,7 @@
       api.platform.name('linux'),
       api.properties(environment='Staging', repository='engine'),
       api.buildbucket.try_build(
-        project='proj',
+        project='prod',
         builder='try-builder',
         git_repo='https://flutter.googlesource.com/mirrors/engine',
         revision='a' * 40,