* do not use bzlmod for integration test

* change distro target

* split out doc_build to non bzlmod
This commit is contained in:
aiuto 2023-11-22 09:33:50 -05:00 committed by GitHub
parent 3917ae6444
commit dd4cb3ca99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 20 deletions

View File

@ -1,23 +1,17 @@
lts: &lts
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

View File

@ -61,10 +61,6 @@ ubuntu1804: &ubuntu
platform: ubuntu1804
<<: *common
<<: *default_tests
build_targets:
- "//distro:distro"
- "//distro:relnotes"
- "//doc_build:*"
centos7: &centos
platform: centos7_java11_devtoolset10
@ -94,6 +90,9 @@ tasks:
platform: ubuntu1804
build_flags:
- "--enable_bzlmod"
build_targets:
- "//distro:distro"
- "//distro:relnotes"
<<: *common
<<: *rolling
<<: *default_tests
@ -118,6 +117,10 @@ tasks:
name: lts_ubuntu
<<: *ubuntu
<<: *lts
build_targets:
- "//distro:distro"
- "//distro:relnotes"
- "//doc_build:*"
lts_windows:
name: lts_windows
<<: *windows

View File

@ -15,9 +15,13 @@ local_repository(
#)
# 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",
)

View File

@ -58,6 +58,7 @@ _find_system_git = repository_rule(
},
)
# 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 @@ def experimental_find_system_git(name, workspace_file = None, verbose = False):
"@%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)