-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a custom bazel-postsubmit.yml file for Bazel in downstream pipeli…
…ne (#1878) Fixes bazelbuild/bazel#21292 After bazelbuild/bazel@a54a393, the canonical repo name returned by Bazel@HEAD no longer matches the name in MODULE.bazel.lock, therefore we need to run `bazel mod deps --lockfile_mode=update` to re-generate the lockfile before running the build. This is done by changing the postsubmi.yml file for Bazel to a custom version located in the CI repo, which can be updated by running `./update-bazel-postsubmit.sh` under `./pipelines`. We may revert this change after we update Bazel to 7.1 for building Bazel itself.
- Loading branch information
1 parent
f2bb6fc
commit de5ab84
Showing
4 changed files
with
500 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
diff --git bazel-postsubmit.yml bazel-postsubmit.yml | ||
index 1ee30a9a94..7995b62de5 100644 | ||
--- bazel-postsubmit.yml | ||
+++ bazel-postsubmit.yml | ||
@@ -1,4 +1,5 @@ | ||
--- | ||
+# Update this file by running ./update-bazel-postsubmit.sh under the same directory | ||
|
||
tasks: | ||
centos7_java11_devtoolset10: | ||
@@ -8,6 +9,7 @@ tasks: | ||
- rm -f WORKSPACE.bzlmod.bak | ||
- rm -rf $HOME/bazeltest | ||
- mkdir $HOME/bazeltest | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-linux" | ||
build_targets: | ||
@@ -73,6 +75,7 @@ tasks: | ||
- rm -f WORKSPACE.bzlmod.bak | ||
- rm -rf $HOME/bazeltest | ||
- mkdir $HOME/bazeltest | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-linux" | ||
build_targets: | ||
@@ -132,6 +135,7 @@ tasks: | ||
- rm -f WORKSPACE.bzlmod.bak | ||
- rm -rf $HOME/bazeltest | ||
- mkdir $HOME/bazeltest | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-linux" | ||
build_targets: | ||
@@ -165,6 +169,7 @@ tasks: | ||
- rm -rf $HOME/bazeltest | ||
- mkdir $HOME/bazeltest | ||
- ln -sf $OUTPUT_BASE/external $HOME/bazeltest/external | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-macos" | ||
build_targets: | ||
@@ -228,6 +233,7 @@ tasks: | ||
- rm -rf $HOME/bazeltest | ||
- mkdir $HOME/bazeltest | ||
- ln -sf $OUTPUT_BASE/external $HOME/bazeltest/external | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-macos" | ||
build_targets: | ||
@@ -289,6 +295,7 @@ tasks: | ||
- mklink /J C:\b\bazeltest_external %OUTPUT_BASE:/=\%\external | ||
batch_commands: | ||
- powershell -Command "(Get-Content WORKSPACE.bzlmod) -Replace '# android_', 'android_' | Set-Content WORKSPACE.bzlmod" | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ci-windows" | ||
build_targets: | ||
@@ -359,6 +366,7 @@ tasks: | ||
-e 's/^# android_sdk_repository/android_sdk_repository/' | ||
-e 's/^# android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod | ||
- rm -f WORKSPACE.bzlmod.bak | ||
+ - bazel mod deps --lockfile_mode=update | ||
build_flags: | ||
- "--config=ubuntu2004_java11" | ||
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com" |
Oops, something went wrong.