Skip to content

Commit c649341

Browse files
[ci] Migrate remaing unblocked repo checks to LUCI (#4543)
Migrates the federated safety check and the post-submit portion of the version check to LUCI, removing the Cirrus versions. Only the presubmit version check, with its specific TODO, is left in Cirrus since we don't yet have a solution for running it under LUCI. Part of flutter/flutter#114373
1 parent e6a7144 commit c649341

4 files changed

Lines changed: 39 additions & 26 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
if [[ $LUCI_PR == "" ]]; then
8+
echo "This check is only run in presubmit"
9+
else
10+
./script/tool_runner.sh federation-safety-check
11+
fi

.ci/scripts/check_version.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
# For pre-submit, this is currently run in Cirrus; see TODO below.
8+
# For post-submit, ignore platform interface breaking version changes and
9+
# missing version/CHANGELOG detection since PR-level overrides aren't available
10+
# in post-submit.
11+
if [[ $LUCI_PR == "" ]]; then
12+
./script/tool_runner.sh version-check --ignore-platform-interface-breaks
13+
else
14+
# TODO(stuartmorgan): Migrate this check from Cirrus. See
15+
# https://github.com/flutter/flutter/issues/130076
16+
:
17+
fi

.ci/targets/repo_checks.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,9 @@ tasks:
4848
script: script/tool_runner.sh
4949
args: ["publish-check", "--allow-pre-release"]
5050
always: true
51-
# TODO(stuartmorgan): Convert remaining checks from Cirrus repo_checks. See
52-
# https://github.com/flutter/flutter/issues/114373
51+
- name: CHANGELOG and version validation
52+
script: .ci/scripts/check_version.sh
53+
always: true
54+
- name: federated safety check
55+
script: .ci/scripts/check_federated_safety.sh
56+
always: true

.cirrus.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,11 @@ task:
4545
zone: us-central1-a
4646
namespace: default
4747
matrix:
48-
# Repository rules and best-practice enforcement.
49-
# Only channel-agnostic tests should go here since it is only run once
50-
# (on Flutter master).
51-
- name: repo_checks
52-
always:
53-
version_script:
54-
# For pre-submit, pass the PR labels to the script to allow for
55-
# check overrides.
56-
# For post-submit, ignore platform version breaking version changes
57-
# and missing version/CHANGELOG detection since the labels aren't
58-
# available outside of the context of the PR.
59-
- if [[ $CIRRUS_PR == "" ]]; then
60-
- ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
61-
- else
62-
- ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"
63-
- fi
64-
federated_safety_script:
65-
# This check is only meaningful for PRs, as it validates changes
66-
# rather than state.
67-
- if [[ $CIRRUS_PR == "" ]]; then
68-
- echo "Only run in presubmit"
69-
- else
70-
- ./script/tool_runner.sh federation-safety-check
71-
- fi
48+
# TODO(stuartmorgan): Migrate this to LUCI; See check_version.sh.
49+
- name: version_check
50+
only_if: $CIRRUS_PR != ''
51+
version_script:
52+
- ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"
7253

7354
# Heavy-workload Linux tasks.
7455
# These use machines with more CPUs and memory, so will reduce parallelization

0 commit comments

Comments
 (0)