Don't update last green when running bazelisk --migrate
Part of
Fixes the problem demonstrated here:
@@ -1879,12 +1879,14 @@ def print_project_pipeline(
# 3. This job doesn't run on master branch (could be a custom build launched manually)
# 4. We don't intend to run the same job in downstream with Bazel@HEAD (eg. google-bazel-presubmit)
# 5. We are testing incompatible flags
+ # 6. We are running `bazelisk --migrate` in a non-downstream pipeline
if not (
is_pull_request()
or use_but
or os.getenv("BUILDKITE_BRANCH") != "master"
or pipeline_slug not in all_downstream_pipeline_slugs
or incompatible_flags
+ or use_bazelisk_migrate()
):
# We need to call "Try Update Last Green Commit" even if there are failures,
# since we don't want a failing Buildifier step to block the update of
