fasterci / rules_gitops

Apache License 2.0
17 stars 6 forks source link

Support for rules_oci 2.x (using bzlmod) #40

Closed jvolkman closed 1 month ago

jvolkman commented 1 month ago

I encountered two issues when upgrading to rules_oci 2.x. The same issues were also raised on Bazel Slack here.

  1. @rules_oci//oci:repositories.bzl no longer exports a LATEST_CRANE_VERSION variable. I refactored repositories.bzl and extracted toolchain-related stuff used by the bzlmod extension to a new toolchains.bzl. repositories.bzl still requires LATEST_CRANE_VERSION, but it's no longer loaded by the bzlmod extension, so doesn't cause failures.
  2. oci_push no longer depends on the yq toolchain. I've updated push_oci_rule to explicitly depend on the yq toolchain in addition to whatever else the underlying oci_push implementation depends on.