Skip to content

Commit 70e415a

Browse files
authored
[build] allow manually rerunning RBE with cache disabled (#15680)
1 parent 4cacd4a commit 70e415a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/ci-rbe.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
branches:
77
- trunk
88
workflow_dispatch:
9+
inputs:
10+
disable_test_cache:
11+
description: 'Force re-run of tests (disable test cache)'
12+
required: false
13+
default: false
14+
type: boolean
915

1016
jobs:
1117
format:
@@ -26,4 +32,4 @@ jobs:
2632
name: All RBE tests
2733
caching: false
2834
ruby-version: jruby-9.4.12.0
29-
run: ./scripts/github-actions/ci-build.sh
35+
run: ./scripts/github-actions/ci-build.sh ${{ github.event.inputs.disable_test_cache }}

scripts/github-actions/ci-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ set -eufo pipefail
44
# We want to see what's going on
55
set -x
66

7+
# Default to auto if no parameter is provided
8+
CACHE_RESULTS="auto"
9+
10+
# If "disable test cache" is passed in and true
11+
if [ $# -gt 0 ] && [ "$1" = "true" ]; then
12+
CACHE_RESULTS="no"
13+
fi
14+
715
# Now run the tests. The engflow build uses pinned browsers
816
# so this should be fine
917
# shellcheck disable=SC2046
1018
bazel test --config=rbe-ci --build_tests_only \
1119
--keep_going --flaky_test_attempts=2 \
20+
--cache_test_results=${CACHE_RESULTS} \
1221
//... -- $(cat .skipped-tests | tr '\n' ' ')
1322

1423
# Build the packages we want to ship to users

0 commit comments

Comments
 (0)