CI fixes (#784)
* do not use bzlmod for integration test
* change distro target
* split out doc_build to non bzlmod
diff --git a/.bazelci/integration.yml b/.bazelci/integration.yml
index d73a4d7..cf05c44 100644
--- a/.bazelci/integration.yml
+++ b/.bazelci/integration.yml
@@ -1,23 +1,17 @@
-lts: <s
- bazel: latest
-
-rolling: &rolling
- bazel: rolling
-
common: &common
- platform: ubuntu1804
working_directory: ..
build_targets:
- - "distro:*"
+ - "distro:all"
tasks:
rolling_ubuntu:
name: rolling_distro
- <<: *rolling
+ platform: ubuntu1804
+ bazel: rolling
<<: *common
lts_ubuntu:
name: lts_distro
platform: ubuntu1804
- <<: *lts
+ bazel: latest
<<: *common
diff --git a/.bazelci/tests.yml b/.bazelci/tests.yml
index 3fc0111..d64a858 100644
--- a/.bazelci/tests.yml
+++ b/.bazelci/tests.yml
@@ -61,10 +61,6 @@
platform: ubuntu1804
<<: *common
<<: *default_tests
- build_targets:
- - "//distro:distro"
- - "//distro:relnotes"
- - "//doc_build:*"
centos7: ¢os
platform: centos7_java11_devtoolset10
@@ -94,6 +90,9 @@
platform: ubuntu1804
build_flags:
- "--enable_bzlmod"
+ build_targets:
+ - "//distro:distro"
+ - "//distro:relnotes"
<<: *common
<<: *rolling
<<: *default_tests
@@ -118,6 +117,10 @@
name: lts_ubuntu
<<: *ubuntu
<<: *lts
+ build_targets:
+ - "//distro:distro"
+ - "//distro:relnotes"
+ - "//doc_build:*"
lts_windows:
name: lts_windows
<<: *windows
diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod
index e5300a3..3a25ac4 100644
--- a/WORKSPACE.bzlmod
+++ b/WORKSPACE.bzlmod
@@ -15,9 +15,13 @@
#)
# Needed for making our release notes
-#load("//toolchains/git:git_configure.bzl", "experimental_find_system_git")
-#
-#experimental_find_system_git(
-# name = "rules_pkg_git",
-# verbose = False,
-#)
+load("//toolchains/git:git_configure.bzl", "experimental_find_system_git_bzlmod")
+
+experimental_find_system_git_bzlmod(
+ name = "rules_pkg_git",
+ verbose = False,
+)
+register_toolchains(
+ "@rules_pkg_git//:git_auto_toolchain",
+ "//toolchains/git:git_missing_toolchain",
+)
diff --git a/toolchains/git/git_configure.bzl b/toolchains/git/git_configure.bzl
index c1f9a0e..f537c1a 100644
--- a/toolchains/git/git_configure.bzl
+++ b/toolchains/git/git_configure.bzl
@@ -58,6 +58,7 @@
},
)
+# buildifier: disable=function-docstring-args
def experimental_find_system_git(name, workspace_file = None, verbose = False):
"""Create a toolchain that lets you run git.
@@ -76,3 +77,19 @@
"@%s//:git_auto_toolchain" % name,
"@rules_pkg//toolchains/git:git_missing_toolchain",
)
+
+# buildifier: disable=function-docstring-args
+def experimental_find_system_git_bzlmod(name, workspace_file = None, verbose = False):
+ """Create a toolchain that lets you run git.
+
+ WARNING: This is experimental. The API and behavior are subject to change
+ at any time.
+
+ This presumes that your Bazel WORKSPACE file is located under your git
+ client. That is often true, but might not be in a multi-repo where you
+ might weave together a Bazel workspace from several git repos that are
+ all rooted under the WORKSPACE file.
+ """
+ if not workspace_file:
+ workspace_file = Label("//:MODULE.bazel")
+ _find_system_git(name = name, workspace_file = workspace_file, verbose = verbose)