@@ -13,14 +13,32 @@ if [ -z $token ]; then
1313TEAMCITY_TOKEN not set. Get one here:
1414
1515https://teamcity.cockroachdb.com/profile.html?item=accessTokens
16+
17+ Usage: $0 <pr-number-or-branch> <test-regex> [sha]
18+
19+ Examples:
20+ $0 12345 'perturbation/full/intents'
21+ $0 my-branch-name 'kv/splits.*' a1b2c3d4
22+
23+ Note: PR numbers work for all cases (recommended). Branch names only work
24+ for branches pushed directly to cockroachdb/cockroach, not personal forks.
25+ For fork branches, use the PR number instead.
26+
27+ Environment variables:
28+ COUNT - number of test iterations (default: 1)
29+ DEBUG - enable debug mode (default: false)
30+ USE_SPOT - use spot VMs: never, auto, always (default: never)
31+ The "auto" default in nightly scripts uses spot for the
32+ first attempt, which causes preemptions on single-iteration
33+ PR-triggered runs. Override here defaults to "never".
1634EOF
1735 exit 1
1836fi
1937
2038pr=${1-}
2139
2240while [ -z $pr ]; do
23- read -p ' PR number (defaults to first arg, can also use branch name ): ' pr
41+ read -p ' PR number or branch name (PR number recommended ): ' pr
2442done
2543
2644tests=${2-}
@@ -50,6 +68,7 @@ json_payload=$(jq -n \
5068 --arg tests " $tests " \
5169 --arg envDebug " ${DEBUG-false} " \
5270 --arg envCount " ${COUNT-1} " \
71+ --arg envUseSpot " ${USE_SPOT-never} " \
5372 ' {
5473 buildType: {id: "Cockroach_Nightlies_RoachtestNightlyGceBazel"},
5574 branchName: $branch_name,
@@ -60,7 +79,8 @@ json_payload=$(jq -n \
6079 {name: "env.SELECT_PROBABILITY", value: "1.0"},
6180 {name: "env.DEBUG", value: $envDebug},
6281 {name: "env.COUNT", value: $envCount},
63- {name: "env.TESTS", value: $tests}
82+ {name: "env.TESTS", value: $tests},
83+ {name: "env.USE_SPOT", value: $envUseSpot}
6484 ]
6585 }
6686}' )
0 commit comments