Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: adopt bzlmod #75

Closed
wants to merge 24 commits into from
Closed

Conversation

manuelnaranjo
Copy link
Contributor

TBD

I need to revist the list of commits and squash a few most likely

@manuelnaranjo manuelnaranjo force-pushed the mnaranjo/bzlmod branch 8 times, most recently from cfc6595 to 3f51d00 Compare July 15, 2024 15:05
@manuelnaranjo
Copy link
Contributor Author

Ok now this works as expected, I can consume it from our MODULE.bazel with:

# used to convert RPMs into .tar we can use as container layers
bazel_dep(name = "bazeldnf", version = "0.6.0-rc8")
archive_override(
    module_name = "bazeldnf",
    # computed with:
    # wget <url> -O rule.tar.gz
    # INTEGRITY=$(openssl dgst -sha256 -binary rule.tar.gz | openssl base64 -A | sed 's/^/sha256-/')
    integrity = "sha256-3MuxVWW2Biya+LWNfi7GC3qbWCPg2yr/mInOb7w8rHU=",
    strip_prefix = "bazeldnf-v0.6.0-rc8",
    urls = [
        "https://github.com/bookingcom/bazeldnf/releases/download/v0.6.0-rc8/bazeldnf-v0.6.0-rc8.tar.gz",
    ],
    patch_strip = 1,
    patches = [
        "@//bazel:patches/bazeldnf.patch",
    ],
)

Will cleanup the branch so we can merge the initial bzlmod support

Using a matrix instead of copying the test structure so many times
Prebuilts are now handled differently and require a proper release
process, in order to allow forks to also release we need to consume
GITHUB_REPOSITORY while rendering the repo files.
There were quite a few missing things from my merged code this should
fix it
When building bazeldnf we now use bzlmod as well
updating build files to match the latest gazelle settings
adding bazel6 bzlmod test
now we have a step to validate buildifier
We no longer need this bzl file with bzlmod and rules_go go.mod support
following the suggestions from bazeldnf linter
ctx.actions.args is a more efficient way of dealing with arguments that
get passed into actions
heaviliy inspired in https://github.com/aspect-build/bazel-lib which also
provides a few prebuilt golang binaries
now while archiving we stamp the content
Make sure platforms are available accross the entire repository and not
only in bazeldnf/private
Making sure github keeps bazel cache around
fixing small issue with the legacy external API
We have no config for release, no need to pass this flag
We need to execute the release target instead of build
We don't need to support the multiple versions approach suggested
by the templates repo, we're closer to aspect-bazel-lib than to
a wrapper for already available tools
when building the tool it self we can use bazel 7
Stop waisting valuable CI time in protoc building
@rmohr
Copy link
Owner

rmohr commented Oct 7, 2024

Finally there with #77

@rmohr rmohr closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants