Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 07f48a6

Browse files
[ci] Pin master in Cirrus (#4667)
This uses a pinned version from a file instead of `master` when checking out Flutter for `master` channel testing in Cirrus. Currently it's a static version, but this will be updated by an auto-roller. This uses a version of `master` from several days ago to avoid the current tree breakage due to flutter/flutter#96661 This will not affect LUCI tests; that will require a separate recipe change. Part of flutter/flutter#93811
1 parent ec80d34 commit 07f48a6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.ci/flutter_master.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3e6e996f9eff50d77214d37c1c5f8b71bcc0d559

.cirrus.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,25 @@ tool_setup_template: &TOOL_SETUP_TEMPLATE
1515

1616
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
1717
upgrade_flutter_script:
18+
# Master uses a pinned, auto-rolled version to prevent out-of-band CI
19+
# failures due to changes in Flutter.
20+
# TODO(stuartmorgan): Investigate an autoroller for stable as well.
21+
- TARGET_TREEISH=$CHANNEL
22+
- if [[ "$CHANNEL" == "master" ]]; then
23+
- TARGET_TREEISH=$(< .ci/flutter_$CHANNEL.version)
24+
- fi
1825
# Ensure that the repository has all the branches.
1926
- cd $FLUTTER_HOME
2027
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
2128
- git fetch origin
22-
# Switch to the requested branch.
23-
- git checkout $CHANNEL
24-
# Reset to upstream branch, rather than using pull, since the base image
25-
# can sometimes be in a state where it has diverged from upstream (!).
26-
- git reset --hard @{u}
29+
# Switch to the requested channel.
30+
- git checkout $TARGET_TREEISH
31+
# When using a branch rather than a hash, reset to the upstream branch
32+
# rather than using pull, since the base image can sometimes be in a state
33+
# where it has diverged from upstream (!).
34+
- if [[ "$TARGET_TREEISH" == "$CHANNEL" ]]; then
35+
- git reset --hard @{u}
36+
- fi
2737
# Run doctor to allow auditing of what version of Flutter the run is using.
2838
- flutter doctor -v
2939
<< : *TOOL_SETUP_TEMPLATE

0 commit comments

Comments
 (0)