v1.2.2
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_apko", version = "1.2.2")
Using WORKSPACE
Paste this snippet into your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_apko",
sha256 = "f176171f95ee2b6eef1572c6da796d627940a1e898a32d476a2d7a9a99332960",
strip_prefix = "rules_apko-1.2.2",
url = "https://github.com/chainguard-dev/rules_apko/releases/download/v1.2.2/rules_apko-v1.2.2.tar.gz",
)
######################
# rules_apko setup #
######################
# Fetches the rules_apko dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@rules_apko//apko:repositories.bzl", "apko_register_toolchains", "rules_apko_dependencies")
rules_apko_dependencies()
apko_register_toolchains(name = "apko")
load("@rules_apko//apko:translate_lock.bzl", "translate_apko_lock")
translate_apko_lock(
name = "example_lock",
lock = "@//:apko.lock.json",
)
load("@example_lock//:repositories.bzl", "apko_repositories")
apko_repositories()
Initial setup
rules_apko requires a one-time setup to configure bazel to be able to make partial fetches.
Follow https://github.com/chainguard-dev/rules_apko/blob/main/docs/initial-setup.md for the setup.
What's Changed
- Make sure
.apko/range.sh
is created executable by apko_bazelrc macro. by @sfc-gh-ptabor in #40 - Rename .resolve targets (deprecated) to .lock targets (consistency with apko 0.13+) by @sfc-gh-ptabor in #47
- chore: update locks by @thesayyn in #51
Full Changelog: v1.2.1...v1.2.2