[co19] Document how co19 rolls are done.

Change-Id: Ie0fecc0ca5c17f0a875988fe90c1b12f6052a975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107290
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Jonas Termansen 2019-08-22 08:16:37 +00:00
parent 51f6cab413
commit ceaf00ebe6
2 changed files with 73 additions and 0 deletions

2
DEPS
View file

@ -36,6 +36,8 @@ vars = {
"chromium_git": "https://chromium.googlesource.com",
"fuchsia_git": "https://fuchsia.googlesource.com",
# co19 is a cipd package. Use tests/co19_2/update.sh to update this hash.
# It requires access to the dart-build-access group, which EngProd has.
"co19_2_rev": "d2c051f7537e6fe47c8ccf0bd7a7e84b02010a2a",
# As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision

71
tests/co19_2/update.sh Executable file
View file

@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Uploads a new version of the co19 CIPD packages.
# This script requires access to the dart-build-access group, which EngProd has.
set -e
set -x
if [ ! -e tests/co19_2 ]; then
echo "$0: error: Run this script at the root of the Dart SDK" >&2
exit 1
fi
# Find the latest co19 commit.
rm -rf tests/co19_2/src.git
git clone https://dart.googlesource.com/co19 tests/co19_2/src.git
CO19=tests/co19_2/src.git
OLD=$(gclient getdep --var=co19_2_rev)
NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/master)
git fetch origin
git branch cl-co19-roll-co19-to-$NEW origin/master
git checkout cl-co19-roll-co19-to-$NEW
# Build a cipd package of the commit.
BUILD_ID=$(bb add \
-commit https://dart.googlesource.com/co19/+/$NEW \
-json \
dart/ci/co19-roller \
| jq '.id' \
| tr -d '"')
bb collect -interval 10s $BUILD_ID
# Update DEPS:
gclient setdep --var=co19_2_rev=$NEW
# Make a nice commit. Don't include the '#' character to avoid referencing Dart
# SDK issues.
git commit DEPS -m \
"$(printf "[co19] Roll co19 to $NEW\n\n" &&
cd $CO19 &&
git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' \
$OLD..$NEW | tr -d '#')"
rm -rf tests/co19_2/src.git
GIT_EDITOR=true git cl upload
ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)
BUILDERS=$(jq '.builder_configurations|
map(select(.steps|
any(.arguments|
select(.!=null)|
any(.=="co19_2"))))|
map(.builders)|
flatten|
sort' \
tools/bots/test_matrix.json \
| tr -d '[",]')
git cl try -B luci.dart.try $(for BUILDER in $BUILDERS; do echo -b $BUILDER-try; done)
git cl web
set +x
cat << EOF
Wait for the builders to finish. If any failed, pre-approve them:
tools/sdks/dart-sdk/bin/dart tools/approve_results.dart \
-p https://dart-review.googlesource.com/c/sdk/+/$ISSUE
EOF