Skip to content

Commit 679e2a2

Browse files
committed
[infra] Use Cq-Include-Trybots instead of git cl try for co19 rolls
Cq-Include-Trybots allows the CQ to submit the rolls safely and allows for editorial control of which tryjobs to run for a given roll before starting them. Also formats the jq program according to go/bash-style/#s5.3-pipelines. Change-Id: Ib072c971b06bd1e4bbff05887c8a84434c5949ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166637 Reviewed-by: Jonas Termansen <sortie@google.com>
1 parent a369992 commit 679e2a2

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/co19/update.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,32 @@ bb collect -interval 10s $BUILD_ID
3232
# Update DEPS:
3333
gclient setdep --var=co19_rev=$NEW
3434

35+
BUILDERS=$(jq -r '.builder_configurations
36+
| map(select(.steps
37+
| any(.arguments
38+
| select(.!=null)
39+
| any(test("co19($|(/.*))")))))
40+
| map(.builders)
41+
| flatten
42+
| sort
43+
| .[] += "-try"
44+
| join(",")' \
45+
tools/bots/test_matrix.json)
46+
3547
# Make a nice commit. Don't include the '#' character to avoid referencing Dart
3648
# SDK issues.
3749
git commit DEPS -m \
38-
"$(printf "[co19] Roll co19 to $NEW\n\n" &&
39-
cd $CO19 &&
40-
git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' \
41-
$OLD..$NEW | tr -d '#')"
50+
"$(printf "[co19] Roll co19 to $NEW\n\n" \
51+
&& cd $CO19 \
52+
&& git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
53+
&& printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n" \
54+
| tr -d '#')"
4255

4356
rm -rf tests/co19/src.git
4457

4558
GIT_EDITOR=true git cl upload
4659
ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)
4760

48-
BUILDERS=$(jq '.builder_configurations|
49-
map(select(.steps|
50-
any(.arguments|
51-
select(.!=null)|
52-
any(test("co19($|(/.*))")))))|
53-
map(.builders)|
54-
flatten|
55-
sort' \
56-
tools/bots/test_matrix.json \
57-
| tr -d '[",]')
58-
59-
git cl try -B dart/try $(for BUILDER in $BUILDERS; do echo -b $BUILDER-try; done)
60-
6161
git cl web
6262

6363
set +x

0 commit comments

Comments
 (0)