From c9a25843f5abeaee6939ab1a824d8529f30cffc2 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 31 Aug 2023 12:38:56 -0700 Subject: [PATCH] [ci] Convert version presubmit check to LUCI (#4822) Adds a LUCI version of the version presubmit check, using the new label passthrough functionality, and removes it from Cirrus. Since that was the last Cirrus task, this removes the entire Cirrus config, and the associated Dockerfile. Part of https://github.com/flutter/flutter/issues/130076 --- .ci/Dockerfile | 6 ------ .ci/scripts/check_version.sh | 7 +++---- .ci/targets/repo_checks.yaml | 9 +++++---- .cirrus.yml | 34 ---------------------------------- 4 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 .ci/Dockerfile delete mode 100644 .cirrus.yml diff --git a/.ci/Dockerfile b/.ci/Dockerfile deleted file mode 100644 index fb93ac9f35c1a..0000000000000 --- a/.ci/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# The Flutter version is not important here, since the CI scripts update Flutter -# before running. What matters is that the base image is pinned to minimize -# unintended changes when modifying this file. -FROM cirrusci/flutter@sha256:d99b1ba2602240a74722970b5c0cd704bbe60a7eba7557157c784f2f693c393f - -RUN apt-get update -y diff --git a/.ci/scripts/check_version.sh b/.ci/scripts/check_version.sh index a695281d7e228..4e7d0ecbcd8fa 100755 --- a/.ci/scripts/check_version.sh +++ b/.ci/scripts/check_version.sh @@ -4,14 +4,13 @@ # found in the LICENSE file. set -e -# For pre-submit, this is currently run in Cirrus; see TODO below. +# For pre-submit, check for missing or breaking changes that don't have a +# corresponding override label. # For post-submit, ignore platform interface breaking version changes and # missing version/CHANGELOG detection since PR-level overrides aren't available # in post-submit. if [[ $LUCI_PR == "" ]]; then ./script/tool_runner.sh version-check --ignore-platform-interface-breaks else - # TODO(stuartmorgan): Migrate this check from Cirrus. See - # https://github.com/flutter/flutter/issues/130076 - : + ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$PR_OVERRIDE_LABELS" fi diff --git a/.ci/targets/repo_checks.yaml b/.ci/targets/repo_checks.yaml index 72a4691a4f2e5..ebf4994cd5769 100644 --- a/.ci/targets/repo_checks.yaml +++ b/.ci/targets/repo_checks.yaml @@ -44,13 +44,14 @@ tasks: script: script/tool_runner.sh args: ["dependabot-check"] always: true - - name: publishability - script: script/tool_runner.sh - args: ["publish-check", "--allow-pre-release"] - always: true - name: CHANGELOG and version validation script: .ci/scripts/check_version.sh always: true - name: federated safety check script: .ci/scripts/check_federated_safety.sh always: true + # This is the slowest test, so prefer keeping it last. + - name: publishability + script: script/tool_runner.sh + args: ["publish-check", "--allow-pre-release"] + always: true diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 71b801f4223f1..0000000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,34 +0,0 @@ -gcp_credentials: ENCRYPTED[!9409b709ab4de7293a70606cca13eaf42e9cbc704e8a6b4e3d2b09484cf997cbd2334e1eeafe23626ad07a726106df90!] - -# Run on PRs and main branch post submit only. Don't run tests when tagging. -only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main') - -setup_template: &SETUP_TEMPLATE - upgrade_flutter_script: - - PINNED_VERSION=$(< .ci/flutter_master.version) - # Ensure that the repository has everything. - - cd $FLUTTER_HOME - - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - - git fetch origin - # Switch to the pinned master version. - - git checkout $TARGET_TREEISH - # Run doctor to allow auditing of what version of Flutter the run is using. - - flutter doctor -v - tool_setup_script: - - .ci/scripts/prepare_tool.sh - -task: - << : *SETUP_TEMPLATE - gke_container: - dockerfile: .ci/Dockerfile - builder_image_name: docker-builder-linux # gce vm image - builder_image_project: flutter-cirrus - cluster_name: test-cluster - zone: us-central1-a - namespace: default - matrix: - # TODO(stuartmorgan): Migrate this to LUCI; See check_version.sh. - - name: version_check - only_if: $CIRRUS_PR != '' - version_script: - - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"