Initial setup (when using with Bazel < 7.1)
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.
Using Bzlmod
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_apko", version = "1.4.0")
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 = "bb99e7040dbebdf5edd5a2a0d6078f5e2e0a4f8d57e419216c3844b9062042c1",
strip_prefix = "rules_apko-1.4.0",
url = "https://github.com/chainguard-dev/rules_apko/releases/download/v1.4.0/rules_apko-v1.4.0.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()
translate_apko_lock(
name = "example_multifile_lock",
lock = "@//multifile_config:apko.generated.lock.json",
)
load("@example_multifile_lock//:repositories.bzl", multifile_lock_repositories = "apko_repositories")
multifile_lock_repositories()
What's Changed
- Allow users to provide the versions of apko binaries not listed in versions.bzl by @sfc-gh-mhazy in #78
- Fix cross repo multifile apko configs by @sfc-gh-mhazy in #80
- fix deprecation attr, allow empty glob by @sophiephoon-canva in #83
- Fix alpine by updating lock file by @mattmoor in #85
- Preliminary support for
HTTP_AUTH
. by @mattmoor in #84 - Harden GHA Workflows by @egibs in #86
- chore(deps): update stardoc by @alexeagle in #91
- Fix path to apko binary in apko_lock. by @sfc-gh-mhazy in #92
- add apko 0.19.2 by @imjasonh in #98
New Contributors
- @mattmoor made their first contribution in #85
- @egibs made their first contribution in #86
- @imjasonh made their first contribution in #98
Full Changelog: v1.3.0...v1.4.0