From 312ab25f6994b2fac89dc6910b3ebd6cb93cfa74 Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Wed, 25 Sep 2024 16:40:52 +0200 Subject: [PATCH] Only update last green commit for main branch (#2043) --- buildkite/bazelci.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index ce8b118e4c..233221519d 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py @@ -3427,19 +3427,20 @@ def print_bazel_publish_binaries_pipeline(task_configs, http_config, file_config ) ) - pipeline_steps.append({"wait": None, "continue_on_failure": False}) + if current_branch_is_main_branch(): + pipeline_steps.append({"wait": None, "continue_on_failure": False}) - pipeline_steps.append( - create_step( - label="Update last green commit for Bazel", - commands=[ - fetch_bazelcipy_command(), - PLATFORMS[DEFAULT_PLATFORM]["python"] - + " bazelci.py try_update_last_green_commit", - ], - platform=DEFAULT_PLATFORM, + pipeline_steps.append( + create_step( + label="Update last green commit for Bazel", + commands=[ + fetch_bazelcipy_command(), + PLATFORMS[DEFAULT_PLATFORM]["python"] + + " bazelci.py try_update_last_green_commit", + ], + platform=DEFAULT_PLATFORM, + ) ) - ) print_pipeline_steps(pipeline_steps)