Skip to content

v1.2.1

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Jan 17:43
· 23 commits to main since this release
620fba9

Using Bzlmod with Bazel 6

  1. Enable with common --enable_bzlmod in .bazelrc.
  2. Add to your MODULE.bazel file:
bazel_dep(name = "rules_apko", version = "1.2.1")

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 = "0164a1422da69fe6a12f8eedcd331e5539eaf1fd6dc98981bc8f858d1169e4a9",
    strip_prefix = "rules_apko-1.2.1",
    url = "https://github.com/chainguard-dev/rules_apko/releases/download/v1.2.1/rules_apko-v1.2.1.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.resolved.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

  • Update CONTRIBUTING.md by @alexeagle in #38
  • Bugfix: call to rules_apko target from another repository was failing by @sfc-gh-ptabor in #39
  • Integrate with apko-0.13+ . Pass --lockfile to apko to get hermetic (re)builds. by @sfc-gh-ptabor in #41

Full Changelog: v1.1.0...v1.2.1