-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
74557: ci: bring bazel ci up to parity with checks performed in old ci r=rail,celiala a=rickystewart Up until this point, checking the release justification and whether all generated files were up to date was done only in GitHub CI rather than Bazel CI. We just copy those same checks into Bazel CI as well. Closes #68385. Release note: None Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
7 changed files
with
87 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root | ||
source "$dir/teamcity-bazel-support.sh" # For run_bazel | ||
|
||
tc_start_block "Ensure generated code is up to date" | ||
run_bazel build/teamcity/cockroach/ci/tests/check_generated_code_impl.sh | ||
tc_end_block "Ensure generated code is up to date" |
27 changes: 27 additions & 0 deletions
27
build/teamcity/cockroach/ci/tests/check_generated_code_impl.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root, check_workspace_clean | ||
|
||
mkdir -p artifacts | ||
|
||
# Buffer noisy output and only print it on failure. | ||
if ! (./build/bazelutil/check.sh &> artifacts/buildshort.log || (cat artifacts/buildshort.log && false)); then | ||
# The command will output instructions on how to fix the error. | ||
exit 1 | ||
fi | ||
rm artifacts/buildshort.log | ||
|
||
build/bazelutil/bazel-generate.sh \ | ||
BAZEL_SUPPORT_EXTRA_DOCKER_ARGS="-e COCKROACH_BAZEL_FORCE_GENERATE=1" \ | ||
&> artifacts/buildshort.log || (cat artifacts/buildshort.log && false) | ||
|
||
rm artifacts/buildshort.log | ||
if grep TODO DEPS.bzl; then | ||
echo "Missing TODO comment in DEPS.bzl. Did you run \`./dev generate bazel --mirror\`?" | ||
exit 1 | ||
fi | ||
check_workspace_clean "Run \`./dev generate bazel\` to automatically regenerate these." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters