Skip to content

Commit

Permalink
[infra] Use Cq-Include-Trybots instead of git cl try for co19 rolls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
athomas committed Oct 9, 2020
1 parent a369992 commit 679e2a2
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/co19/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ bb collect -interval 10s $BUILD_ID
# Update DEPS:
gclient setdep --var=co19_rev=$NEW

BUILDERS=$(jq -r '.builder_configurations
| map(select(.steps
| any(.arguments
| select(.!=null)
| any(test("co19($|(/.*))")))))
| map(.builders)
| flatten
| sort
| .[] += "-try"
| join(",")' \
tools/bots/test_matrix.json)

# 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 '#')"
"$(printf "[co19] Roll co19 to $NEW\n\n" \
&& cd $CO19 \
&& git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
&& printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n" \
| tr -d '#')"

rm -rf tests/co19/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(test("co19($|(/.*))")))))|
map(.builders)|
flatten|
sort' \
tools/bots/test_matrix.json \
| tr -d '[",]')

git cl try -B dart/try $(for BUILDER in $BUILDERS; do echo -b $BUILDER-try; done)

git cl web

set +x
Expand Down

0 comments on commit 679e2a2

Please sign in to comment.